Set-VMHost
Set-VMHost
Configures a Hyper-V host.
Syntax
Parameter Set: CimSession
Set-VMHost [-CimSession] <Microsoft.Management.Infrastructure.CimSession[]> [-EnableEnhancedSessionMode <Nullable [System.Boolean]> ] [-FibreChannelWwnn <System.String> ] [-FibreChannelWwpnMaximum <System.String> ] [-FibreChannelWwpnMinimum <System.String> ] [-MacAddressMaximum <System.String> ] [-MacAddressMinimum <System.String> ] [-MaximumStorageMigrations <System.UInt32> ] [-MaximumVirtualMachineMigrations <System.UInt32> ] [-NumaSpanningEnabled <Nullable [System.Boolean]> ] [-Passthru] [-ResourceMeteringSaveInterval <Nullable [System.TimeSpan]> ] [-UseAnyNetworkForMigration <System.Boolean> ] [-VirtualHardDiskPath <System.String> ] [-VirtualMachineMigrationAuthenticationType <Microsoft.HyperV.PowerShell.MigrationAuthenticationType> {CredSSP | Kerberos} ] [-VirtualMachineMigrationPerformanceOption <Microsoft.HyperV.PowerShell.VMMigrationPerformance> {TCPIP | Compression | SMB} ] [-VirtualMachinePath <System.String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ComputerName
Set-VMHost [[-ComputerName] <System.String[]> ] [[-Credential] <System.Management.Automation.PSCredential[]> ] [-EnableEnhancedSessionMode <Nullable [System.Boolean]> ] [-FibreChannelWwnn <System.String> ] [-FibreChannelWwpnMaximum <System.String> ] [-FibreChannelWwpnMinimum <System.String> ] [-MacAddressMaximum <System.String> ] [-MacAddressMinimum <System.String> ] [-MaximumStorageMigrations <System.UInt32> ] [-MaximumVirtualMachineMigrations <System.UInt32> ] [-NumaSpanningEnabled <Nullable [System.Boolean]> ] [-Passthru] [-ResourceMeteringSaveInterval <Nullable [System.TimeSpan]> ] [-UseAnyNetworkForMigration <System.Boolean> ] [-VirtualHardDiskPath <System.String> ] [-VirtualMachineMigrationAuthenticationType <Microsoft.HyperV.PowerShell.MigrationAuthenticationType> {CredSSP | Kerberos} ] [-VirtualMachineMigrationPerformanceOption <Microsoft.HyperV.PowerShell.VMMigrationPerformance> {TCPIP | Compression | SMB} ] [-VirtualMachinePath <System.String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detaillierte Beschreibung
The Set-VMHost cmdlet configures a Hyper-V host.
Parameter
-CimSession<Microsoft.Management.Infrastructure.CimSession[]>
Das Cmdlet wird in einer Remotesitzung oder auf einem Remotecomputer ausgeführt. Geben Sie einen Computernamen oder ein Sitzungsobjekt ein, wie z. B. die Ausgabe eines New-CimSession oder Get-CimSession-Cmdlets. Der Standardwert ist die aktuelle Sitzung auf dem lokalen Computer.
Aliase |
none |
Erforderlich? |
true |
Position? |
1 |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
true(ByPropertyName) |
Platzhalterzeichen akzeptieren? |
false |
-ComputerName<System.String[]>
Specifies one or more Hyper-V hosts on which this cmdlet operates. NetBIOS names, IP addresses, and fully qualified domain names are allowable. The default is the local computer. Use localhost or a dot (.) to specify the local computer explicitly.
Aliase |
none |
Erforderlich? |
false |
Position? |
1 |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-Credential<System.Management.Automation.PSCredential[]>
Specifies one or more user accounts that have permission to perform this action. The default is the current user.
Aliase |
none |
Erforderlich? |
false |
Position? |
2 |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-EnableEnhancedSessionMode<Nullable [System.Boolean]>
Indicates whether users can use enhanced mode when they connect to virtual machines on this server by using Virtual Machine Connection.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-FibreChannelWwnn<System.String>
Specifies the default value of the World Wide Node Name on the Hyper-V host.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-FibreChannelWwpnMaximum<System.String>
Specifies the maximum value that can be used to generate World Wide Port Names on the Hyper-V host. Use with the FibreChannelWwpnMinimum parameter to establish a range of WWPNs that the specified Hyper-V host can assign to virtual Fibre Channel adapters.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-FibreChannelWwpnMinimum<System.String>
Specifies the minimum value that can be used to generate the World Wide Port Names on the Hyper-V host. Use with the FibreChannelWwpnMaximum parameter to establish a range of WWPNs that the specified Hyper-V host can assign to virtual Fibre Channel adapters.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-MacAddressMaximum<System.String>
Specifies the maximum MAC address using a valid hexadecimal value. Use with the MacAddressMinimum parameter to establish a range of MAC addresses that the specified Hyper-V host can assign to virtual machines configured to receive dynamic MAC addresses.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-MacAddressMinimum<System.String>
Specifies the minimum MAC address using a valid hexadecimal value. Use with the MacAddressMaximum parameter to establish a range of MAC addresses that the specified Hyper-V host can assign to virtual machines configured to receive dynamic MAC addresses.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-MaximumStorageMigrations<System.UInt32>
Specifies the maximum number of storage migrations that can be performed at the same time on the Hyper-V host.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-MaximumVirtualMachineMigrations<System.UInt32>
Specifies the maximum number of live migrations that can be performed at the same time on the Hyper-V host.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-NumaSpanningEnabled<Nullable [System.Boolean]>
Specifies whether virtual machines on the Hyper-V host can use resources from more than one NUMA node.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-Passthru
Specifies that a Microsoft.HyperV.PowerShell.Host is to be passed through to the pipeline representing the Hyper-V host to be configured.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-ResourceMeteringSaveInterval<Nullable [System.TimeSpan]>
Specifies how often the Hyper-V host saves the data that tracks resource usage. The range is a minimum of 1 hour to a maximum of 24 hours. Time within that range can be specified using a format of hh:mm:ss, where hh indicates hours, mm indicates minutes, and ss indicates seconds. You also can use a Timespan object to specify the interval.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-UseAnyNetworkForMigration<System.Boolean>
Specifies how networks are selected for incoming live migration traffic. If set to $True, any available network on the host can be used for this traffic. If set to $False, incoming live migration traffic is transmitted only on the networks specified in the MigrationNetworks property of the host. The Get-VMMigrationNetwork cmdlet returns the list of networks that can be used for migration traffic.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-VirtualHardDiskPath<System.String>
Specifies the default folder to store virtual hard disks on the Hyper-V host.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-VirtualMachineMigrationAuthenticationType<Microsoft.HyperV.PowerShell.MigrationAuthenticationType>
Specifies the type of authentication to be used for live migrations. Die zulässigen Werte für diesen Parameter sind: Kerberos and CredSSP.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-VirtualMachineMigrationPerformanceOption<Microsoft.HyperV.PowerShell.VMMigrationPerformance>
Specifies the performance option to use for live migration. Die zulässigen Werte für diesen Parameter sind:
-- Compression. Compress data to speed up live migration on constrained networks.
-- SMBTransport. Use server message block (SMB) to get the highest throughput possible.
-- None. Perform standard live migration.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-VirtualMachinePath<System.String>
Specifies the default folder to store virtual machine configuration files on the Hyper-V host.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-Confirm
Fordert Sie vor der Ausführung des Cmdlet zum Bestätigen auf.
Erforderlich? |
false |
Position? |
named |
Standardwert |
false |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-WhatIf
Zeit, was passieren würde, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.
Erforderlich? |
false |
Position? |
named |
Standardwert |
false |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
<CommonParameters>
Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer und -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Eingaben
Der Eingabetyp ist der Typ der Objekte, die Sie per Piping an das Cmdlet übergeben können.
Ausgaben
Der Ausgabetyp ist der Typ der Objekte, die vom Cmdlet ausgegeben werden.
- None by default; Microsoft.HyperV.PowerShell.Host if –PassThru is specified.
Beispiele
Example 1
This example configures the local Hyper-V host to allow 10 simultaneous live migrations and storage migrations.
PS C:\> Set-VMHost -MaximumVirtualMachineMigrations 10 –MaximumStorageMigrations 10
Example 2
This example configures a range of MAC addresses range for the local Hyper-V host.
PS C:\> Set-VMHost -MacAddressMinimum 00155D020600 -MacAddressMaximum 00155D0206FF
Example 3
This example enables the use of any network for incoming live migrations on the local Hyper-V host.
PS C:\> Set-VMHost –UseAnyNetworkForMigration $true
Example 4
This example specifies new default locations for virtual hard disksand virtual machines on the local Hyper-V host.
PS C:\> Set-VMHost –VirtualHardDiskPath "C:\Hyper-V\Virtual Hard Disks" –VirtualMachinePath "C:\Hyper-V\Configuration Files"
Example 5
This example configures Fibre Channel host settings on the local Hyper-V host.
PS C:\> Set-VMHost -FibreChannelWwnn C003FF0000FFFF00 -FibreChannelWwpnMinimum C003FF661D200000 -FibreChannelWwpnMaximum C003FF661D200000
Example 6
This example disables NUMA spanning on the local Hyper-V host.
PS C:\> Set-VMHost –NumaSpanningEnabled $false
Example 7
This example configures the local Hyper-V host to save data that tracks resource consumption every hour and a half.
PS C:\> Set-VMHost -ResourceMeteringSaveInterval 01:30:00
Example 8
The example configures the local Hyper-V host to use Kerberos to authenticate incoming live migrations.
PS C:\> Set-VMHost –VirtualMachineMigrationAuthenticationType Kerberos