Needed to get the ip addresses for some of my virtual machines and wanted to use powercli to do it.
Found this
get-vm | select Name,@{N="IP Address";E={@($_.guest.IPAddress[0])}} | export-csv c:\VM_IP_Addresses.csv
Changed out-file to export-csv so I could sort it.
Out-file dumps the entire line into one cell, while the export-csv let me use columns in excel.
0 comments:
Post a Comment