Get-VDPortgroup Command | Vmware PowerCLI Reference

Get-VDPortgroup

This cmdlet retrieves distributed port groups.

Syntax

Get-VDPortgroup
-Id < String[] >
[-ProgressAction < ActionPreference > ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Id String[] named
Specifies the IDs of the distributed port groups that you want to retrieve. Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that matches exactly one of the string values in that list.
optional ProgressAction ActionPreference named
optional Server VIServer[] named
  • wildcards
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.
Get-VDPortgroup
[-Name < String[] > ]
[-NetworkAdapter < NetworkAdapter[] > ]
[-ProgressAction < ActionPreference > ]
[-Server < VIServer[] > ]
[-Tag < Tag[] > ]
[-VDSwitch < VDSwitch[] > ]
[-VMHostNetworkAdapter < HostVirtualNic[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional Name String[] named
  • wildcards
Specifies the names of the distributed port groups that you want to retrieve.
optional NetworkAdapter NetworkAdapter[] named
  • pipeline
Specifies a virtual machine network adapter to retrieve the distributed port group to which the network adapter is connected.
optional ProgressAction ActionPreference named
optional Server VIServer[] named
  • wildcards
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 Tag Tag[] named
  • wildcards
Returns only the distributed port groups that are associated with any of the specified tags.
optional VDSwitch VDSwitch[] named
  • pipeline
  • wildcards
Specifies a vSphere distributed switch to retrieve the distributed port groups that belong to the switch.
optional VMHostNetworkAdapter HostVirtualNic[] named
  • pipeline
Specifies a host virtual network adapter to retrieve the distributed port groups to which the network adapter is connected.
Get-VDPortgroup
-RelatedObject < VDPortgroupRelatedObjectBase[] >
[-ProgressAction < ActionPreference > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
RelatedObject VDPortgroupRelatedObjectBase[] named
  • pipeline
Specifies an object to retrieve one or more distributed port groups that are related to the object. This parameter accepts ExternalNetwork, OrgNetwork, NetworkPool, and OMResource objects.
optional ProgressAction ActionPreference named

Output

VMware.VimAutomation.Vds.Types.V1.VDPortgroup

Examples

Example 1

Get-VDPortGroup -Name "MyVDPortGroup" -VDSwitch "MyVDSwitch"

Retrieves the distributed port group named "MyVDPortGroup" on the specified vSphere distributed switch.

Example 2

Get-OrgNetwork -Name "MyOrgNetwork" | Get-VDPortGroup

Retrieves the distributed port groups that are related to the specified organization network in the cloud.

Example 3

Get-NetworkAdapter -Name "MyVMNetworkAdapter" | Get-VDPortGroup

Retrieves the distributed port group to which the specified virtual machine network adapter is connected.

Related Commands

VDPort

This cmdlet retrieves virtual distributed ports.

This cmdlet modifies the configuration of virtual distributed ports.

VDPortGroup

This cmdlet exports the configuration of a specified distributed port group to a specified .zip file.

This cmdlet removes distributed port groups.

VDPortgroup

This cmdlet retrieves distributed port groups.

This cmdlet creates distributed port groups.

This cmdlet modifies the configuration of distributed port groups.

VDPortgroupOverridePolicy

This cmdlet retrieves the policy for overriding port group settings at port level.

This cmdlet modifies the policy for overriding port group settings at port level.