New-SCSubnetVLan

Creates a subnet VLAN object.

Syntax

Default (Default)

New-SCSubnetVLan
    [-VMMServer <ServerConnection>]
    [-VLanID <Int32>]
    [-Subnet <String>]
    [-SupportsDHCP <Boolean>]
    [-SecondaryVLanID <Int32>]
    [<CommonParameters>]

Description

The New-SCSubnetVLan cmdlet creates a subnet VLAN object. You can use a subnet VLAN to create a logical network definition or VM subnet.

For information about how to create a logical network definition, type Get-Help New-SCLogicalNetworkDefinition -Detailed.

For information about how to create a VM subnet, type Get-Help New-SCVMSubnet -Detailed.

Examples

Example 1: Create a subnet VLAN

PS C:\> $SubnetVLAN = New-SCSubnetVLAN -Subnet "10.0.0.1/24" -VLanID 25

This command creates a subnet VLAN object with a subnet value of 10.0.0.1/24 and a VLAN value of 25.

Parameters

-SecondaryVLanID

Specifies the secondary VLAN ID for a subnet VLAN.

Parameter properties

Type:Int32
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

-Subnet

Specifies an IP subnet (IPv4 or IPv6) in Classless Inter-Domain Routing (CIDR) notation.

  • Example format for an IPv4 subnet: 192.168.0.1/24
  • Example format for an IPv6 subnet: FD4A:29CD:184F:3A2C::/64

Note: An IP subnet cannot overlap with any other subnet in a host group or child host groups.

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

-SupportsDHCP

Indicates whether DHCP is supported by the subnet VLAN.

Parameter properties

Type:Boolean
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

-VLanID

Assigns a numerical identifier in the range 1-4094 to a virtual network adapter on a virtual machine or to a physical network adapter on a virtual machine host.

Configure a VLanID on a Hyper-V, VMware ESX, or Citrix XenServer host on an externally bound physical network adapter when the VLan mode is Access.

Configure a VLanID on a virtual network adapter of a virtual machine bound to a physical network adapter on the host, or bound to an internal virtual network on the host.

Example format: -VLanEnabled -VLanMode "Access" -VLANID 35

Parameter properties

Type:Int32
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

-VMMServer

Specifies a Virtual Machine Manager (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

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.

Outputs

SubnetVLAN

This cmdlet returns a SubnetVLAN object.