New-SCVMSubnet

Creates a virtual machine subnet.

Syntax

New-SCVMSubnet [-Name] <String> [[-Description] <String>] [-JobVariable <String>]
 -LogicalNetworkDefinition <LogicalNetworkDefinition> [-MaxNumberOfPorts <UInt32>] [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-PortACL <PortACL>] [-RunAsynchronously]
 -SubnetVLan <SubnetVLan[]> [-VMMServer <ServerConnection>] -VMNetwork <VMNetwork> [<CommonParameters>]
New-SCVMSubnet [-Name] <String> [[-Description] <String>] [-JobVariable <String>] [-MaxNumberOfPorts <UInt32>]
 [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-PortACL <PortACL>]
 [-RunAsynchronously] -SubnetVLan <SubnetVLan[]> [-VMMServer <ServerConnection>] -VMNetwork <VMNetwork>
 [-VMSubnetID <UInt32>] [<CommonParameters>]
New-SCVMSubnet [-Name] <String> [[-Description] <String>] [-JobVariable <String>] [-MaxNumberOfPorts <UInt32>]
 [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-PortACL <PortACL>]
 [-RunAsynchronously] [-VMMServer <ServerConnection>] -VMNetwork <VMNetwork> [-VMSubnetExternal]
 [<CommonParameters>]

Description

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

PS C:\> $SubNetVLan = New-SCSubnetVLan -Subnet "192.168.3.0/24"
PS C:\> $VMNetwork = Get-SCVMNetwork -Name "VMNetwork01"
PS C:\> New-SCVMSubnet -Name "VMSubnet01" -SubnetVLan $SubnetVLan -VMNetwork $VMNetwork

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.

Type:String
Required:False
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

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

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters: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.

Type:LogicalNetworkDefinition
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MaxNumberOfPorts

Specifies the maximum number of ports supported by the virtual machine subnet.

Type:UInt32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of a Virtual Machine Manager (VMM) object.

Type:String
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnBehalfOfUser

Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters: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.

Type:UserRole
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters: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.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PortACL

Specifies a port access control list (ACL).

Type:PortACL
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsynchronously

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

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SubnetVLan

Specifies one or more IP subnet and VLAN sets.

For information about creating a SubnetVLan, type Get-Help New-SCSubNetVLan.

Type:SubnetVLan[]
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VMNetwork

Specifies a virtual machine network object.

To get a virtual machine network object, use the Get-SCVMNetwork cmdlet.

Type:VMNetwork
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMSubnetExternal

Indicates that the virtual machine network is able to communicate with other networks.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMSubnetID

Specifies the ID of a virtual machine subnet.

Type:UInt32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False