Set-SCVirtualNetwork

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

Description

The Set-SCVirtualNetwork cmdlet changes the properties of a virtual network configured on a host managed by System Center 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.

For more information about Set-SCVirtualNetwork, type: "Get-Help Set-SCVirtualNetwork -online".

Parameters

ClusterVirtualNetwork

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a cluster virtual network object.

BoundToVMHost

Required? false
Accept Pipeline Input? false
Position? named
Indicates whether a virtual network is bound to a host. Binding a virtual network to a host enables network communication to the host.

Description

Required? false
Accept Pipeline Input? false
Position? named
States a description for the specified object.

HostBoundVLanId

Required? false
Accept Pipeline Input? false
Position? named
Assigns a VLAN to the virtual network adapter that was created for the host for the specified virtual network.

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
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. 

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

Name

Required? false
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VirtualNetwork

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a virtual network object.

BoundToVMHost

Required? false
Accept Pipeline Input? false
Position? named
Indicates whether a virtual network is bound to a host. Binding a virtual network to a host enables network communication to the host.

Description

Required? false
Accept Pipeline Input? false
Position? named
States a description for the specified object.

HostBoundVLanId

Required? false
Accept Pipeline Input? false
Position? named
Assigns a VLAN to the virtual network adapter that was created for the host for the specified virtual network.

JobGroup

Required? false
Accept Pipeline Input? false
Position? named
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. 

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

Name

Required? false
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

Examples

1: Unbind a virtual network from a host.
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 
The first command gets the host object named VMHost01 and stores the object in the $VMHost variable.

The second command gets the virtual network object named InternalVNet01 from VMHost01 and 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.

See Also