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.
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.
Parameters
-BoundToVMHost
Indicates whether a virtual network is bound to a host.
Binding a virtual network to a host enables network communication to the host.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Host
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
Cluster
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ClusterVirtualNetwork
Specifies a cluster virtual network object.
Parameter properties
Type:
ClusterVirtualNetwork
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Cluster
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ConvertToLogicalSwitch
Indicates that this cmdlet converts the virtual network to a logical switch.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
StandardSwitchToLogicalSwitch
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Description
Specifies a description for the virtual network.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-HostBoundVLanId
Assigns a VLAN to the virtual network adapter that was created for the host for the specified virtual network.
Parameter properties
Type:
UInt16
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Host
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
Cluster
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-JobGroup
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.
Parameter properties
Type:
Guid
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-JobVariable
Specifies that job progress is tracked and stored in the variable named by this parameter.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-LogicalSwitch
Specifies a logical switch object.
Parameter properties
Type:
LogicalSwitch
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LogicalSwitch
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Name
Specifies the name of a VMM object.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Host
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
Cluster
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PROTipID
Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action.
This parameter lets you audit PRO tips.
Parameter properties
Type:
Guid
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VirtualNetwork
Specifies a virtual network object.
Parameter properties
Type:
VirtualNetwork
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Host
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
LogicalSwitch
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMHostNetworkAdapters
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
Parameter properties
Type:
HostNetworkAdapter[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
LogicalSwitch
Position:
Named
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.