< Back

Set-VDVlanConfiguration

Sun Jan 19, 2020 7:25 pm

NAME Set-VDVlanConfiguration



SYNOPSIS

This cmdlet modifies the virtual distributed port's VLAN configuration.





SYNTAX

Set-VDVlanConfiguration [-DisableVlan] [-PrivateVlanId <Int32>] -VDPort <VDPort[]> [-VlanId <Int32>]

[-VlanTrunkRange <VlanRangeList>] [-Confirm] [-WhatIf] [<CommonParameters>]



Set-VDVlanConfiguration [-DisableVlan] [-PrivateVlanId <Int32>] -VDPortgroup <VDPortgroup[]> [-VlanId <Int32>]

[-VlanTrunkRange <VlanRangeList>] [-Confirm] [-WhatIf] [<CommonParameters>]



Set-VDVlanConfiguration [-DisableVlan] [-PrivateVlanId <Int32>] -VDSwitch <VDSwitch[]> [-VlanId <Int32>]

[-VlanTrunkRange <VlanRangeList>] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

This cmdlet modifies the virtual distributed port's VLAN configuration. For vSphere distributed switch and port

group parameter sets, the cmdlet modifies the respective default port configuration.





PARAMETERS

-DisableVlan [<SwitchParameter>]

Sets the VLAN type to None.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-PrivateVlanId <Int32>

Specifies the secondary VLAN ID of a vSphere distributed switch's private VLAN configuration entry. The VLAN

IDs of 0 and 4095 are reserved and cannot be used.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-VDPort <VDPort[]>

Specifies the port whose VLAN configuration you want to modify.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-VDPortgroup <VDPortgroup[]>

Specifies the port group whose default VLAN port configuration you want to modify.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-VDSwitch <VDSwitch[]>

Specifies the vSphere distributed switch whose default VLAN port configuration you want to modify.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-VlanId <Int32>

Specifies a new VLAN ID. The VLAN IDs of 0 and 4095 are reserved and cannot be used.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-VlanTrunkRange <VlanRangeList>

Specifies a new VLAN trunk range. Valid values are strings representing ranges of IDs. For example, "1-4, 6,

8-9".



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false,

the cmdlet runs without asking for user confirmation.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are

modified.



Required? false

Position? named

Default value False

Accept pipeline input? False

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

The updated entity - VDPort, VDPortgroup, or VDSwitch







NOTES









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



Get-VDSwitch "MyVDSwitch" | Get-VDPort -ActiveOnly | Set-VDVlanConfiguration -PrivateVlanId 4



Assigns all active ports of a specific vSphere distributed switch named "MyVDSwitch" to a private VLAN with ID "4".

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



Get-VDPortgroup "MyVDPorgroup" | Get-VDPort | Set-VDVlanConfiguration -VlanId 3



Assigns all ports of a specific distributed port group named "MyVDPorgroup" to a VLAN with ID "3".



RELATED LINKS

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