I am finishing up the new VMware lab at work and need to document the setup. Part of this documentation includes getting all the ip’s on each VMhost and their corresponding use. A quick and easy way to do this is to leverage the awesomeness of PowerCLI.
So, here is a great one-liner that requires little post formatting to get what you need:
Get-VMHostNetworkAdapter | select vmhost,portgroupname,ip | Export-Csv c:\YourDirectory\network.csv