次の方法で共有


New-SCLogicalNetworkDefinition

New-SCLogicalNetworkDefinition

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

Syntax

Parameter Set: Default
New-SCLogicalNetworkDefinition -LogicalNetwork <LogicalNetwork> -Name <String> -SubnetVLan <SubnetVLan[]> -VMHostGroup <HostGroup[]> [-JobVariable <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Detailed Description

The New-SCLogicalNetworkDefinition cmdlet creates a definition for a 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".

Parameters

-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

-LogicalNetwork<LogicalNetwork>

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.

Aliases

none

Required?

true

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?

named

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

-VMHostGroup<HostGroup[]>

Specifies a virtual machine host group object.

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

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

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.

  • LogicalNetworkDefiniton

Notes

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

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.

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

New-SCSubnetVLan

Get-SCLogicalNetworkDefinition

New-SCLogicalNetwork

Remove-SCLogicalNetworkDefinition

Set-SCLogicalNetworkDefinition