- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The previous answer will work in most cases, but to have it as the CSV export does it (multiple NICs and IPv6 addresses), you'll have to do something like this.
Note that you'll need to have VMware Tools installed to get the IP adresses.
Get-VM |
Select Name,@{N='IP Address';E={
@($_.guest.IPAddress | where{[ipaddress]::Parse($_).AddressFamily -eq 'InterNetwork'}
$_.Guest.IpAddress | where{[ipaddress]::Parse($_).AddressFamily -eq 'InterNetworkv6'}) -join ','
}}
And yes, this "Joker" remembers Peter Frampton.
In fact I even remember Humble Pie :smileycool:
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference