New-SCVMSubnet
Creates a virtual machine subnet.
Syntax
New-SCVMSubnet
[-VMMServer <ServerConnection>]
[-Name] <String>
[[-Description] <String>]
-SubnetVLan <SubnetVLan[]>
-VMNetwork <VMNetwork>
[-VMSubnetID <UInt32>]
[-MaxNumberOfPorts <UInt32>]
[-PortACL <PortACL>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVMSubnet
[-VMMServer <ServerConnection>]
[-Name] <String>
[[-Description] <String>]
-SubnetVLan <SubnetVLan[]>
-VMNetwork <VMNetwork>
-LogicalNetworkDefinition <LogicalNetworkDefinition>
[-MaxNumberOfPorts <UInt32>]
[-PortACL <PortACL>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVMSubnet
[-VMMServer <ServerConnection>]
[-Name] <String>
[[-Description] <String>]
[-VMSubnetExternal]
-VMNetwork <VMNetwork>
[-MaxNumberOfPorts <UInt32>]
[-PortACL <PortACL>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<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 |
Position: | 1 |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaxNumberOfPorts
Specifies the maximum number of ports supported by the virtual machine subnet.
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the name of a Virtual Machine Manager (VMM) object.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
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 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PortACL
Specifies a port access control list (ACL).
Type: | PortACL |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | False |
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[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
Specifies a VMM server object.
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
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 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMSubnetExternal
Indicates that the virtual machine network is able to communicate with other networks.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMSubnetID
Specifies the ID of a virtual machine subnet.
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |