Set-VMHost

Set-VMHost

Configures a Hyper-V host.

構文

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>]

詳細説明

The Set-VMHost cmdlet configures a Hyper-V host.

パラメーター

-CimSession<Microsoft.Management.Infrastructure.CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。コンピューター名またはセッション オブジェクト (New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など) を入力します。既定値は、ローカル コンピューター上の現在のセッションです。

Aliases

none

必須/オプション

true

位置

1

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

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.

Aliases

none

必須/オプション

false

位置

1

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

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.

Aliases

none

必須/オプション

false

位置

2

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

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.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-FibreChannelWwnn<System.String>

Specifies the default value of the World Wide Node Name on the Hyper-V host.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

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.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

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.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

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.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

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.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-MaximumStorageMigrations<System.UInt32>

Specifies the maximum number of storage migrations that can be performed at the same time on the Hyper-V host.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-MaximumVirtualMachineMigrations<System.UInt32>

Specifies the maximum number of live migrations that can be performed at the same time on the Hyper-V host.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-NumaSpanningEnabled<Nullable [System.Boolean]>

Specifies whether virtual machines on the Hyper-V host can use resources from more than one NUMA node.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

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.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

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.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

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.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-VirtualHardDiskPath<System.String>

Specifies the default folder to store virtual hard disks on the Hyper-V host.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-VirtualMachineMigrationAuthenticationType<Microsoft.HyperV.PowerShell.MigrationAuthenticationType>

Specifies the type of authentication to be used for live migrations. このパラメーターに指定できる値は、次のとおりです。 Kerberos and CredSSP.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-VirtualMachineMigrationPerformanceOption<Microsoft.HyperV.PowerShell.VMMigrationPerformance>

Specifies the performance option to use for live migration. このパラメーターに指定できる値は、次のとおりです。

-- 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.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-VirtualMachinePath<System.String>

Specifies the default folder to store virtual machine configuration files on the Hyper-V host.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Confirm

コマンドレットを実行する前に確認メッセージを表示します。

必須/オプション

false

位置

named

既定値

false

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-WhatIf

コマンドレットが実行された場合に何が起きるのかを示します。コマンドレットは実行されません。

必須/オプション

false

位置

named

既定値

false

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

<CommonParameters>

このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットが出力するオブジェクトの型です。

  • None by default; Microsoft.HyperV.PowerShell.Host if –PassThru is specified.

使用例

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