New-SCLogicalNetworkDefinition

Creates a definition for a logical network that can be associated with one or more host groups.

Description

The New-SCLogicalNetworkDefinition cmdlet creates a definition for a System Center Virtual Machine Manager (VMM) logical network. The logical network can be associated with one or more host groups. A logical network definition is also called a network site.

After you create a new logical network, use the logical network definitinon to assign IP subnets and VLANs to the logical network. For information about creating logical networks, type: "Get-Help New-SCLogicalNetwork -detailed".

For more information about New-SCLogicalNetworkDefinition, type: "Get-Help New-SCLogicalNetworkDefinition -online".

Parameters

LogicalNetwork

Required? true
Accept Pipeline Input? false
Position? named
Specifies a logical network. A logical network is a named grouping of IP subnets and VLANs that is used to organize and simplify network assignments.

Name

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

SubnetVLan

Required? true
Accept Pipeline Input? false
Position? named
Specifies one or more IP subnet and VLAN sets.

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

VMHostGroup

Required? true
Accept Pipeline Input? false
Position? named
Specifies a virtual machine host group object.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.
Requires a VMM logical network object, which can be retrieved by using the Get-SCLogicalNetwork cmdlet and a VMM host group object which can be retrieved by using the Get-SCVMHostGroup cmdlet.

Examples

1: Create a logical network definition for a logical network.
PS C:\> $LogicalNetwork = Get-SCLogicalNetwork -Name "LogicalNetwork01"
PS C:\> $HostGroup =@()
PS C:\> $HostGroup += Get-SCVMHostGroup | where { $_.Path -eq "All Hosts\HostGroup01" }
PS C:\> $Hostgroup += Get-SCVMHostGroup | where { $_.Path -eq "All Hosts\HostGroup02\Production" }
PS C:\> $SubnetVLAN = @()
PS C:\> $SubnetVLAN += New-SCSubnetVLAN -Subnet 10.0.0.0/24 -VLAN 25
PS C:\> $SubnetVLAN += New-SCSubnetVLAN -Subnet FD4A:29CD:184F:3A2C::/64 -VLAN 25
PS C:\> New-SCLogicalNetworkDefinition -Name "Logical Network Definition 01" -LogicalNetwork $LogicalNetwork -VMHostGroup $HostGroup -SubnetVLAN $SubnetVLAN
The first command gets the logical network named LogicalNetwork01.

The second command creates a host group array and stores it in the $HostGroup variable. The third and fourth commands retrieve the host groups named "HostGroup01" and "Production", and add them to the $HostGroup array.

The fifth command creates a subnet VLAN array and stores it in the $SubnetVLAN variable. The sixth and seventh commands create SubnetVLAN objects with the specified subnet and VLAN values and then store the objects in the $SubnetVLAN array. 

The eighth command creates a logical network definition named "Logical Network Definition 01" for the logical network object stored in the $LogicanNetwork variable using the objects stored in the $HostGroup and $SubnetVLAN arrays.

See Also