Get-VDPort Command | Vmware PowerCLI Reference

Get-VDPort

This cmdlet retrieves virtual distributed ports. At least one of the VDSwitch or VDPortgroup parameters must be specified.

Syntax

Get-VDPort
[-ActiveOnly ]
[-ConnectedOnly ]
[-Key < String[] > ]
[-ProgressAction < ActionPreference > ]
[-Server < VIServer[] > ]
[-Uplink ]
[-VDPortgroup < VDPortgroup[] > ]
[-VDSwitch < VDSwitch[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional ActiveOnly SwitchParameter named
If set, only the active ports are returned.
optional ConnectedOnly SwitchParameter named
If set, only the connected ports are returned.
optional Key String[] named
Specifies the key of the port which you want to retrieve.
optional ProgressAction ActionPreference named
optional Server 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 Uplink SwitchParameter named
If set, only uplink ports are returned. If not set, both uplink and non-uplink ports are returned. This parameter, like every SwitchParameter, can also be set to false (-Uplink:$false), in which case only non-uplink ports are returned.
optional VDPortgroup VDPortgroup[] named
  • pipeline
Specifies the distributed virtual port group whose ports you want to retrieve.
optional VDSwitch VDSwitch[] named
  • pipeline
Specifies the vSphere distributed switch whose ports you want to retrieve.

Output

VMware.VimAutomation.Vds.Types.V1.VDPort

Examples

Example 1

Get-VDPortGroup "MyVDPortgroup" | Get-VDPort -Key "MyPortgroupKey"

Retrieves a virtual distributed port assigned with a key named "MyPortgroupKey" from a virtual distributed port group named "MyVDPortgroup".

Example 2

Get-VDSwitch "MyVDSwitch" | Get-VDPort -Uplink

Retrieves all uplink virtual distributed ports of a vSphere distributed switch named "MyVDSwitch".

Example 3

Get-VDSwitch "MyVDSwitch" | Get-VDPort -ConnectedOnly

Retrieves all connected virtual distributed ports of a vSphere distributed switch named "MyVDSwitch".

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.