Export (0) Print
Expand All
Expand Minimize

New-SCVMSubnet

Updated: April 29, 2014

Applies To: System Center 2012 R2 Virtual Machine Manager

New-SCVMSubnet

Creates a virtual machine subnet.

Syntax

Parameter Set: WindowsNetworkVirtualization
New-SCVMSubnet [-Name] <String> [[-Description] <String> ] -SubnetVLan <SubnetVLan[]> -VMNetwork <VMNetwork> [-JobVariable <String> ] [-MaxNumberOfPorts <UInt32> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [-VMSubnetID <UInt32> ] [ <CommonParameters>]

Parameter Set: Vlan
New-SCVMSubnet [-Name] <String> [[-Description] <String> ] -LogicalNetworkDefinition <LogicalNetworkDefinition> -SubnetVLan <SubnetVLan[]> -VMNetwork <VMNetwork> [-JobVariable <String> ] [-MaxNumberOfPorts <UInt32> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: VMSubnetExternal
New-SCVMSubnet [-Name] <String> [[-Description] <String> ] -VMNetwork <VMNetwork> -VMSubnetExternal [-JobVariable <String> ] [-MaxNumberOfPorts <UInt32> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]




Detailed 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.

Parameters

-Description<String>

States a description for the specified object.


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LogicalNetworkDefinition<LogicalNetworkDefinition>

Specifies a logical network definition, which is also called a network site, that contains the subnet that the IP address pool serves as specified by the Subnet parameter.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MaxNumberOfPorts<UInt32>

Specifies the maximum number of ports supported by the VM subnet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a VMM object.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.


Aliases

none

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SubnetVLan<SubnetVLan[]>

Specifies one or more IP subnet and VLAN sets.

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


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMNetwork<VMNetwork>

Specifies a VM network object.

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


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMSubnetExternal

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


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMSubnetID<UInt32>

Specifies the ID of a VM subnet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Create a VM subnet that uses NVGRE as the encapsulation mechanism

The first command creates a subnet VLan object, and then stores the object in the $SubNetVLan variable.

The second command gets the virtual machine network object named VMNetwork 01, and then 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.


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

Related topics

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft