< Back

Get-VDPortgroup

Sun Jan 19, 2020 7:23 pm

NAME Get-VDPortgroup



SYNOPSIS

This cmdlet retrieves distributed port groups.





SYNTAX

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



Get-VDPortgroup [[-Name] <String[]>] [-NetworkAdapter <NetworkAdapter[]>] [-Server <VIServer[]>] [-Tag <Tag[]>]

[-VDSwitch <VDSwitch[]>] [-VMHostNetworkAdapter <HostVirtualNic[]>] [<CommonParameters>]



Get-VDPortgroup -RelatedObject <VDPortgroupRelatedObjectBase[]> [<CommonParameters>]





DESCRIPTION

This cmdlet retrieves distributed port groups.





PARAMETERS

-Id <String[]>

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.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String[]>

Specifies the names of the distributed port groups that you want to retrieve.



Required? false

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-NetworkAdapter <NetworkAdapter[]>

Specifies a virtual machine network adapter to retrieve the distributed port group to which the network

adapter is connected.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-RelatedObject <VDPortgroupRelatedObjectBase[]>

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.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

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? true



-Tag <Tag[]>

Returns only the distributed port groups that are associated with any of the specified tags.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-VDSwitch <VDSwitch[]>

Specifies a vSphere distributed switch to retrieve the distributed port groups that belong to the switch.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



-VMHostNetworkAdapter <HostVirtualNic[]>

Specifies a host virtual network adapter to retrieve the distributed port groups to which the network adapter

is connected.



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 VDPortgroup objects







NOTES









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

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

New-VDPortgroup

Remove-VDPortgroup

Set-VDPortgroup

Export-VDPortgroup