List vlan-id’s

By | May 15, 2019

To prepare for an upcoming change to Upgrade one of our vCenters from version 6.0 (Windows based) to 6.7U2 I needed to collect some Datacenter object information. In this case it was a complete list of the vlan-id’s within this particular vCenter.

To achieve this you can use the following script:

Get-Cluster | Get-VMHost | Foreach-Object {$strClusterName = $_.Parent.Name; Get-VirtualPortGroup $_ | Select-Object @{N="Cluster";E={$strClusterName}},Name,VLanId}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.