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