Find out if host has a portgroup with vlan X

by Grzegorz Kulikowski

Situation : Your portgroup names doesn’t make any sense, and it’s not easy to tell tell vlan id from the name. If you want quickly to discover if you have some portgroup on vswitch that handles vlan X this could be handy:
[sourcecode language=”powershell”]
Get-VMHost your_host| Get-VirtualPortGroup | ? {$_.Vlanid -eq 777} | select name,vlanid
This will check if we have any portgroup defined for ‘your_host’ vswitch.

You may also like

Leave a Reply

Chinese (Simplified)EnglishFrenchGermanHindiPolishSpanish