Set-SCLogicalNetworkDefinition

Modifies a logical network definition.

Syntax

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.

Type:HostGroup[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-JobVariable

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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:LogicalNetworkDefinition
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RemoveVMHostGroup

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

Type:HostGroup[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:SubnetVLan[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VMMServer

Specifies a Virtual Machine Manager (VMM) server object.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

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.