New-VDSwitchPrivateVlan Command | Vmware PowerCLI Reference

New-VDSwitchPrivateVlan

This cmdlet creates private VLAN configuration entries on a vSphere distributed switch.

Syntax

New-VDSwitchPrivateVlan
-PrimaryVlanId < Int32 >
-PrivateVlanType < PrivateVlanType >
-SecondaryVlanId < Int32 >
-VDSwitch < VDSwitch >
[-ProgressAction < ActionPreference > ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
PrimaryVlanId Int32 named
Specifies the primary VLAN ID. The VLAN IDs of 0 and 4095 are reserved and cannot be used.
required
PrivateVlanType PrivateVlanType named
Specifies the private VLAN port type: community, isolated, or promiscuous.
required
SecondaryVlanId Int32 named
Specifies the secondary VLAN ID. The VLAN IDs of 0 and 4095 are reserved and cannot be used.
required
VDSwitch VDSwitch named
  • pipeline
  • wildcards
Specifies the vSphere distributed switch on which to create a private VLAN configuration.
optional ProgressAction ActionPreference named
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" | New-VDSwitchPrivateVlan -PrimaryVlanId 1 -SecondaryVlanId 1 -PrivateVlanType Promiscuous

Creates a private VLAN inside a specific vSphere distributed switch with a promiscuous VLAN port type.

Related Commands

VDSwitch

This cmdlet exports the configuration of a specified vSphere distributed switch to a .zip file.

This cmdlet retrieves vSphere distributed switches.

This cmdlet creates vSphere distributed switches.

This cmdlet removes vSphere distributed switches.

This cmdlet modifies the configuration of vSphere distributed switches.

VDSwitchPhysicalNetworkAdapter

This cmdlet adds host physical network adapters to a vSphere distributed switch.

This cmdlet removes host physical network adapters from the vSphere distributed switches they are connected to.

VDSwitchPrivateVlan

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

This cmdlet creates private VLAN configuration entries on a vSphere distributed switch.

This cmdlet removes private VLAN configuration entries from vSphere distributed switches.

VDSwitchVMHost

This cmdlet adds hosts to the specified vSphere distributed switch.

This cmdlet removes hosts from the specified vSphere distributed switches.