What is the quickest PowerCLI way, when knowing a virtual machine's name and that it is on a standard switch, I can find the VLAN number that the port group it is using is tagged for?
Try "Get-VM $VM_Name | Get-VirtualPortGroup | select Name, VLanId"
Try "Get-VM $VM_Name | Get-VirtualPortGroup | select Name, VLanId"
Perfect Thanks!