< Back

Get-VDPort

Sun Jan 19, 2020 7:22 pm

NAME Get-VDPort



SYNOPSIS

This cmdlet retrieves virtual distributed ports.





SYNTAX

Get-VDPort [[-Key] <String[]>] [-ActiveOnly] [-ConnectedOnly] [-Server <VIServer[]>] [-Uplink] [-VDPortgroup

<VDPortgroup[]>] [-VDSwitch <VDSwitch[]>] [<CommonParameters>]





DESCRIPTION

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

specified.





PARAMETERS

-ActiveOnly [<SwitchParameter>]

If set, only the active ports are returned.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ConnectedOnly [<SwitchParameter>]

If set, only the connected ports are returned.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Key <String[]>

Specifies the key of the port which you want to retrieve.



Required? false

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Server <VIServer[]>

Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this

parameter, the command runs on the default servers. For more information about default servers, see the

description of Connect-VIServer.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Uplink [<SwitchParameter>]

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.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-VDPortgroup <VDPortgroup[]>

Specifies the distributed virtual port group whose ports you want to retrieve.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-VDSwitch <VDSwitch[]>

Specifies the vSphere distributed switch whose ports you want to retrieve.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Zero or more VDPort objects







NOTES





Requires vSphere API 4.0 or later.



-------------------------- 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 LINKS

Online Version: https://code.vmware.com/doc/preview?id= ... DPort.html

Set-VDPort