Set-SCVirtualNetwork

Set-SCVirtualNetwork

Changes the properties of a virtual network configured on a host managed by VMM.

構文

Parameter Set: Host
Set-SCVirtualNetwork [-VirtualNetwork] <VirtualNetwork> [-BoundToVMHost <Boolean]> ] [-Description <String> ] [-HostBoundVLanId <UInt16]> ] [-JobGroup <Guid]> ] [-JobVariable <String> ] [-Name <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [ <CommonParameters>]

Parameter Set: Cluster
Set-SCVirtualNetwork [-ClusterVirtualNetwork] <ClusterVirtualNetwork> [-BoundToVMHost <Boolean]> ] [-Description <String> ] [-HostBoundVLanId <UInt16]> ] [-JobGroup <Guid]> ] [-JobVariable <String> ] [-Name <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [ <CommonParameters>]

Parameter Set: LogicalSwitch
Set-SCVirtualNetwork [-VirtualNetwork] <VirtualNetwork> -LogicalSwitch <LogicalSwitch> [-Description <String> ] [-JobGroup <Guid]> ] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMHostNetworkAdapters <HostNetworkAdapter[]> ] [ <CommonParameters>]

詳細説明

The Set-SCVirtualNetwork cmdlet changes the properties of a virtual network configured on a host managed by Virtual Machine Manager (VMM).

Virtual network properties that you can change include:

-- Any host. For a virtual network configured for virtual machines deployed on any host supported by VMM (a Hyper-V, VMware ESX, or Citrix XenServer host), you can set or modify the name or description.

-- Hyper-V host only. If the host is a Hyper-V host, you can also configure whether virtual machines are bound to the host, and can thus access the host operating system, and you can specify a numerical identifier for a virtual local area network (VLAN) on the host.

パラメーター

-BoundToVMHost<Boolean]>

Indicates whether a virtual network is bound to a host. Binding a virtual network to a host enables network communication to the host.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ClusterVirtualNetwork<ClusterVirtualNetwork>

Specifies a cluster virtual network object.

エイリアス

none

必須?

true

位置は?

1

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-Description<String>

States a description for the specified object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-HostBoundVLanId<UInt16]>

Assigns a VLAN to the virtual network adapter that was created for the host for the specified virtual network.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-JobGroup<Guid]>

Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-LogicalSwitch<LogicalSwitch>

Specifies a logical switch object.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-Name<String>

Specifies the name of a VMM object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VirtualNetwork<VirtualNetwork>

Specifies a virtual network object.

エイリアス

none

必須?

true

位置は?

1

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-VMHostNetworkAdapters<HostNetworkAdapter[]>

Specifies an array of one or more physical network adapter objects on a host to which virtual machines deployed on that host can connect.

Example format: -VMHostNetworkAdapters $VMHostNICs

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

<CommonParameters>

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

入力

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

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • VirtualNetwork

Example 1: Unbind a virtual network from a host

The first command gets the host object named VMHost01, and then stores the object in the $VMHost variable.

The second command gets the virtual network object named InternalVNet01 from VMHost01, and then stores the object in the $VirtualNetwork variable.

The last command renames the virtual network to UnboundVNet01 and sets -VMHostBound to $False. This unbinds the virtual network from the host, which prevents any virtual machines that are attached to this virtual network from accessing the host through this network.

PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01.Contoso.com"
PS C:\> $VirtualNetwork = Get-SCVirtualNetwork -VMHost $VMHost -Name "InternalVNet01"
PS C:\> Set-SCVirtualNetwork -VirtualNetwork $VirtualNetwork -Name "UnboundVNet01" -BoundToVMHost $False

関連トピック

Add-SCVMHostNetworkAdapter

Get-SCVirtualNetwork

Get-SCVirtualNetworkAdapter

Get-SCVMHost

Get-SCVMHostNetworkAdapter

New-SCVirtualNetwork

Remove-SCVirtualNetwork

Set-SCVirtualNetworkAdapter

Set-SCVMHostNetworkAdapter