Here’s another PowerCLI snippit:
Get-VM | Select name,@{N=”IP Address”;E={@($_.guest.IPAddress[0])}} | export-csv –path c:\users\josh.sinclair\desktop\myVMs.csv
Here’s another PowerCLI snippit:
Get-VM | Select name,@{N=”IP Address”;E={@($_.guest.IPAddress[0])}} | export-csv –path c:\users\josh.sinclair\desktop\myVMs.csv
Thank you for this snippit… I looked and looked for some just like this. Can you add an option to look in a vCluster? I have a vCenter Server with one DataCenter and several vClusters. I hope it would be a simple thing like adding “Get-Datacenter $ DC-name”. I’m new to vSphereCLI and not sure how to add this. Please help.