Set-VDPortgroup
This cmdlet modifies the configuration of distributed port groups. You can set the properties of the distributed port group manually, provide a backup profile to import the port group configuration, or rollback to the last valid configuration.Note: You can import or rollback a configuration only on vSphere 5.1 and later.
Syntax
[-DisableVlan]
[-Name <String>]
[-Notes <String>]
[-NumPorts <Int32>]
[-PortBinding <DistributedPortGroupPortBinding>]
[-PrivateVlanId <Int32>]
[-RunAsync]
[-Server <VIServer[]>]
[-VlanId <Int32>]
[-VlanTrunkRange <VlanRangeList>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
VDPortgroup[] | named |
|
Specifies the distributed port group that you want to configure. | optional |
|
SwitchParameter | named |
|
Sets the VLAN type of the distributed port group to None. This parameter is obsolete. Use the corresponding parameter from the Set-VDVlanConfiguration cmdlet instead. | optional |
|
String | named |
|
Specifies a new name for the distributed port group that you want to configure. | optional |
|
String | named |
|
Specifies a new description for the distributed port group that you want to configure. | optional |
|
Int32 | named |
|
Specifies a new number of ports on the distributed port group that you want to configure. | optional |
|
DistributedPortGroupPortBinding | named |
|
Specifies a new port binding setting for the distributed port group that you want to configure. This parameter accepts Static, Dynamic, and Ephemeral values. Note: Dynamic port binding is deprecated. For better performance, static port binding is recommended. | optional |
|
Int32 | named |
|
Specifies the secondary VLAN ID of a vSphere distributed switch's private VLAN configuration entry. This parameter is obsolete. Use the corresponding parameter from the Set-VDVlanConfiguration cmdlet instead. | optional |
|
SwitchParameter | named |
|
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the VMware PowerCLI console. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | optional |
|
Int32 | named |
|
Specifies a new VLAN ID for the distributed port group that you want to configure. The VLAN IDs of 0 and 4095 are reserved and cannot be used. This parameter is obsolete. Use the corresponding parameter from the Set-VDVlanConfiguration cmdlet instead. | optional |
|
VlanRangeList | named |
|
Specifies a new VLAN trunk range for the distributed port group that you want to configure. Valid values are strings representing ranges of IDs. For example, "1-4, 6, 8-9". This parameter is obsolete. Use the corresponding parameter from the Set-VDVlanConfiguration cmdlet instead. |
-VDPortgroup <VDPortgroup[]>
[-RunAsync]
[-Server <VIServer[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
String | named |
|
Specifies the full file path to the .zip file containing the backup configuration that you want to import. You can import only .zip files created with the Export-VDPortgroup cmdlet. Note: This parameter is only supported on vSphere 5.1 and later. | required |
|
VDPortgroup[] | named |
|
Specifies the distributed port group that you want to configure. | optional |
|
SwitchParameter | named |
|
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the VMware PowerCLI console. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. |
-VDPortgroup <VDPortgroup[]>
[-RunAsync]
[-Server <VIServer[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
SwitchParameter | named |
|
Indicates that you want to rollback the distributed port group to its last valid configuration. Note: Rollback is available only on vSphere 5.1 and later. | required |
|
VDPortgroup[] | named |
|
Specifies the distributed port group that you want to configure. | optional |
|
SwitchParameter | named |
|
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the VMware PowerCLI console. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. |
Output
VMware.VimAutomation.Vds.Types.V1.VDPortgroup
Examples
Example 1
Changes the name, number of ports and the VLAN ID of all distributed port groups named "MyVDPortGroup".
Example 2
Changes the VLAN trunk range of all distributed port groups named "MyVDPortGroup".
Example 3
Sets the VLAN type of the specified distributed port group to None.
Example 4
Rollbacks the configuration of all distributed port groups named "MyVDPortGroup".
Example 5
Reconfigures all distributed port groups named "MyVDPortGroup" by importing the configuration from the specified backup profile.
Related Commands
VDPort
VDPortGroup
VDPortgroup