Share via


Set-SCLogicalNetworkDefinition

Modifies a logical network definition.

Syntax

Default (Default)

Set-SCLogicalNetworkDefinition
    [-VMMServer <ServerConnection>]
    [-LogicalNetworkDefinition] <LogicalNetworkDefinition>
    [-AddVMHostGroup <HostGroup[]>]
    [-RemoveVMHostGroup <HostGroup[]>]
    [-Name <String>]
    [-SubnetVLan <SubnetVLan[]>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

Description

The Set-SCLogicalNetworkDefinition cmdlet modifies a logical network definition. For example, you can add a host group to or remove a host group from a logical network definition (also called a network site).

Examples

Example 1: Change the host groups associated with a logical network definition

PS C:\> $LogicalNetwork = Get-SCLogicalNetwork -Name "LogicalNetwork01"
PS C:\> $VMHostGroup = Get-SCVMHostGroup | where { $_.Path -eq "All Hosts\HostGroup02\Production"}
PS C:\> $Definition = Get-SCLogicalNetworkDefinition -LogicalNetwork $LogicalNetwork -VMHostGroup $VMHostGroup -Name "Logical Network Definition 01"
PS C:\> $HostGroup = Get-SCVMHostGroup | where { $_.Path -eq "All Hosts\HostGroup03\Production" }
PS C:\> Set-SCLogicalNetworkDefinition -LogicalnetworkDefinition $Definition -AddVMHostGroup $HostGroup

The first command gets the logical network named "LogicalNetwork01" and stores it in the $LogicalNetwork variable.

The second command gets the host group named "All Hosts\HostGroup02\Production" and stores it in the $VMHostGroup variable.

The third command gets the logical network definition named "Logical Network Definition 01" associated with the logical network stored in $LogicalNetwork and the host group stored in $VMHostGroup.

The fourth command gets the host group object named "All Hosts\HostGroup-3\Production" and stores the object in the $HostGroup variable.

The last command adds the host group stored in $HostGroup to the existing host groups array for the logical network definition stored in $Definition (Logical Network Definition 01).

Parameters

-AddVMHostGroup

Specifies an array of one or more host groups to add to an existing host group array or private cloud.

Parameter properties

Type:

HostGroup[]

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

-JobVariable

Specifies the name of a variable in which job progress is tracked and stored.

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

-LogicalNetworkDefinition

Specifies a logical network definition (also called a network site) that contains the subnet that the IP address pool serves, as specified by the -SubnetVLan parameter.

Parameter properties

Type:LogicalNetworkDefinition
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of a Virtual Machine Manager (VMM) object.

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

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Parameter properties

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

-RemoveVMHostGroup

Specifies an array of one or more host groups to remove from a host group array or private cloud.

Parameter properties

Type:

HostGroup[]

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

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Parameter properties

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

-SubnetVLan

Specifies an array of one or more IP subnet and VLAN sets.

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

Parameter properties

Type:

SubnetVLan[]

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

LogicalNetworkDefiniton

This cmdlet returns a LogicalNetworkDefiniton object.

Notes

  • Requires a VMM logical network definition object, that you retrieve by using the Get-SCLogicalNetworkDefinition cmdlet.