Trying to retireve Vlan Ids of my VIrturalPortgroups using powercli. I can see the VLanIds clearly in the GUI; however, if using Get-VirtualPortGroup command in powercli, it retrieves all other Info, however, VlanID is blank.
If you are working with VSS, not VDS, you could do
Get-VirtualPortGroup -Standard | Select-Object Name, @{N='VLAN';E={$_.ExtensionData.Config.DefaultPortConfig.Vlan.VlanId}}
If you also want to report on VDS have a look at Solved: Re: List Portgroups with Private VLANS - VMware Technology Network VMTN
Thanks so much. These were all going to be VDI so used your link . Worked like a champ