The New-SCVMSubnet cmdlet creates a virtual machine subnet.
A virtual machine subnet is an IP subnet that is associated with a virtual machine network.
When you create a virtual machine subnet, you must provide SubNetVLan and VMNetwork objects.
To create the SubnetVLan object, use the New-SCSubnetVLan cmdlet.
To obtain a VMNetwork object, use the Get-SCVMNetwork cmdlet.
The logical network used by the virtual machine network must be enabled for network virtualization.
Examples
Example 1: Create a virtual machine subnet that uses NVGRE as the encapsulation mechanism
The first command creates a subnet VLan object and stores the object in the $SubNetVLan variable.
The second command gets the virtual machine network object named VMNetwork 01 and stores the object in the $VMNetwork variable.
The last command creates a virtual machine subnet with the name VMSubnet01 using the subnet VLan stored in $SubnetVLan and the virtual machine network stored in $VMNetwork.
Parameters
-Description
Specifies a description for a virtual machine subnet.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
1
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
-LogicalNetworkDefinition
Specifies a logical network definition (also known as a network site) that contains the subnet that the IP address pool serves as specified by the SubnetVLan parameter.
Parameter properties
Type:
LogicalNetworkDefinition
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Vlan
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MaxNumberOfPorts
Specifies the maximum number of ports supported by the virtual machine subnet.
Parameter properties
Type:
UInt32
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
-Name
Specifies the name of a Virtual Machine Manager (VMM) object.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
0
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-OnBehalfOfUser
Specifies a user name.
This cmdlet operates on behalf of the user that this parameter specifies.
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
-OnBehalfOfUserRole
Specifies a user role.
To obtain a user role, use the Get-SCUserRole cmdlet.
This cmdlet operates on behalf of the user role that this parameter specifies.
Parameter properties
Type:
UserRole
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
-PortACL
Specifies a port access control list (ACL).
Parameter properties
Type:
PortACL
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
-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
-SubnetVLan
Specifies one or more IP subnet and VLAN sets.
For information about creating a SubnetVLan, type Get-Help New-SCSubNetVLan.
Parameter properties
Type:
SubnetVLan[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
WindowsNetworkVirtualization
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
Vlan
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMMServer
Specifies a VMM server object.
Parameter properties
Type:
ServerConnection
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMNetwork
Specifies a virtual machine network object.
To get a virtual machine network object, use the Get-SCVMNetwork cmdlet.
Parameter properties
Type:
VMNetwork
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMSubnetExternal
Indicates that the virtual machine network is able to communicate with other networks.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
VMSubnetExternal
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMSubnetID
Specifies the ID of a virtual machine subnet.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
WindowsNetworkVirtualization
Position:
Named
Mandatory:
False
Value from pipeline:
False
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.