Is there a powercli equivalent script to the esxcfg-vswitch -l command? Since Im using a 1000v, the CDP info doesnt really help the ports connected to the 1000v.
I can run that command (esxcfg-vswitch -l) manually on each host and get the info Im looking for, but I'd like a script that will pull the info from that command against all the hosts in a vCenter. Preferably outputted to a CSV file.
The PowerCLI equivalent of the 'esxcfg-vswitch -l' command is Get-VirtualSwitch. I have no experience with the Cisco Nexus 1000v switch, so I don't know what the Get-VirtualSwitch cmdlet does with the 1000v.
Have a look at VDS and 3rd Party VDS Info
Does this produce the info you're after ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
This is the output I get when I run the esxcfg-vswitch-l command. While the script you mentioned will be helpful, Im just looking for the MTU setting on the 1000v and that script doesnt seem to grab it.
You can try the Get-VDSwitch cmdlet. That will show the MTU size in the default output.
Seemed to work, but the MTU value is blank...
In this case you might need to revert to a solution using plink.exe to run the 'esxcfg-vswitch -l' command on the hosts.