Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 180923

List VLans on all hosts

$
0
0

Dear All,

 

I need to find a way to display and export all vlans on all hosts. I am using Standard Switches. I require to have the table like this format.

 

HostName, VLanName, VirtualSwitchName, VLanID

 

I am able to get he details of individual hosts with the below command,

 

Get-VirtualPortGroup -VMHost hostname | ft Name, VirtualSwitch, VLanID

 

But the output does not show the Hostname.

 

I tried the command,

 

Get-VMHost | Get-VirtualPortGroup | ft Name, VirtualSwitch, VLanID

 

But still it is not showing the hostname on the output. If anybody know the PoweShell to create the required output, please help me out.

 

Regards

Rajesh


Viewing all articles
Browse latest Browse all 180923

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>