VMware Cloud Community
TheVMinator
Expert
Expert
Jump to solution

Get VLAN of a Port Group

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?

0 Kudos
1 Solution

Accepted Solutions
dougdziggel
Contributor
Contributor
Jump to solution

Try "Get-VM $VM_Name | Get-VirtualPortGroup | select Name, VLanId"

View solution in original post

0 Kudos
2 Replies
dougdziggel
Contributor
Contributor
Jump to solution

Try "Get-VM $VM_Name | Get-VirtualPortGroup | select Name, VLanId"

0 Kudos
TheVMinator
Expert
Expert
Jump to solution

Perfect Thanks!

0 Kudos