Get-VDSwitchPrivateVlan

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

Syntax

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

Parameters

Required Parameter Name Type Position Features Description
required
VDSwitch
VDSwitch[] named
  • wildcards
  • pipeline
  • Specifies the vSphere distributed switch whose private VLAN configuration entries to retrieve.
    optional
    PrimaryVlanId
    Int32[] named Specifies the primary VLAN ID of the private VLAN configuration entries that you want to retrieve.
    optional
    PrivateVlanType
    PrivateVlanType[] named Specifies the private VLAN type of the VLAN configuration entries that you want to retrieve.
    optional
    SecondaryVlanId
    Int32[] named Specifies the secondary VLAN ID of the private VLAN configuration entries that you want to retrieve.
    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.

    Output

    VMware.VimAutomation.Vds.Types.V1.VDSwitchPrivateVlan

    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.

    Related Commands

    Feedback

    Was this page helpful?