PowerCLI Reference

Get-VDSwitchPrivateVlan

Synopsis

This cmdlet retrieves the private VLAN configuration entries of a vSphere distributed switch.

Syntax

Get-VDSwitchPrivateVlan [-VDSwitch] <VDSwitch[]> [-PrimaryVlanId <Int32[]>] [-SecondaryVlanId <Int32[]>] [-PrivateVlanType <PrivateVlanType[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-VDSwitchPrivateVlan
Remove-VDSwitchPrivateVlan

Detailed Description

This cmdlet retrieves the private VLAN configuration entries of a vSphere distributed switch.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
VDSwitchVDSwitch[]Specifies the vSphere distributed switch whose private VLAN configuration entries to retrieve.truetrue (ByValue)
PrimaryVlanIdInt32[]Specifies the primary VLAN ID of the private VLAN configuration entries that you want to retrieve.falsefalse
PrivateVlanTypePrivateVlanType[]Specifies the private VLAN type of the VLAN configuration entries that you want to retrieve.falsefalse
SecondaryVlanIdInt32[]Specifies the secondary VLAN ID of the private VLAN configuration entries that you want to retrieve.falsefalse
ServerVIServer[]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.falsefalse

Return Type

Zero or more VDSwitchPrivateVlan objects

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDSwitchPrivateVlan -PrivateVlanType Isolated

Retrieves all private VLAN entries of a vSphere distributed switch named "MyVDSwitch" with specified 'isolated' VLAN port type.

-------------- Example 2 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDSwitchPrivateVlan -PrimaryVlanId 1,3

Retrieves the private VLAN entries of a vSphere distributed switch named "MyVDSwitch" with primary VLAN identifiers 1 and 3.


Copyright © VMware, Inc. All rights reserved.