Set-SCLogicalNetworkDefinition

Modifies a logical network definition.

Description

The Set-SCLogicalNetworkDefinition 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).

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

Parameters

LogicalNetworkDefinition

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a logical network definition (also called a network site) that contains the subnet that the IP address pool serves as specified by the Subnet parameter.

AddVMHostGroup

Required? false
Accept Pipeline Input? false
Position? named
Adds one or more host groups to an existing host group array or private cloud.

JobVariable

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

Name

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

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.

RemoveVMHostGroup

Required? false
Accept Pipeline Input? false
Position? named
Removes one or more host groups from a host group array or private cloud.

RunAsynchronously

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

SubnetVLan

Required? false
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".

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

LogicalNetworkDefinition

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a logical network definition (also called a network site) that contains the subnet that the IP address pool serves as specified by the Subnet parameter.

AddVMHostGroup

Required? false
Accept Pipeline Input? false
Position? named
Adds one or more host groups to an existing host group array or private cloud.

JobVariable

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

Name

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

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.

RemoveVMHostGroup

Required? false
Accept Pipeline Input? false
Position? named
Removes one or more host groups from a host group array or private cloud.

RunAsynchronously

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

SubnetVLan

Required? false
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".

VMMServer

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

Examples

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

See Also