As I explained in the article about ExtensionData each VM object has a lot of information stored. If you want to know the IP addresses of a particular VM you can use PowerCLI to get those properties.

You can get the IP addresses for VMs from within the virtual machine from the guest property:

(Get-VM -Name MyVM).Guest.IPAddress

if you use this on all VMs you get a list of IP addresses and not knowing which IP address belongs to which VM:

PowerCLI C:\> (Get-VM).Guest.IPAddress

Since what we wanted was usable IP addresses we have to do something else/different:

Get-VM -Name MyVM | Select Name, @{N="IP";E={@($_.Guest.IPAddress)}}

This wil return the IP address, or if you have more IP addresses, like IPv6, you get an array with the IP addresses.

Or another way:

One VM

(Get-VMGuest -VM (Get-VM -name MyVM)).IPAddress

Multiple VMs

Get-VM | Get-VMGuest | Format-Table VM, IPAddress

Results in:

VM          IP Address
--          ----------
control     {}
Photon      {}
dc01        {}
OpenVPN     {,}
vCenter6    {, fe80::250:56ff:fe81:d61}

Retrieving IP addresses for all VMs

This is useful if you want to create a list of all your VMs with corresponding IP addresses.

Get-VM | Select Name, @{N="IP";E={@($_.guest.IPaddress)}} | foreach { write-host $_.Name $_.IP}


Get-VM | Get-VMGuest | Format-Table VM, IPAddress

The list you get contains the name of the VM and all IP addresses that are known or recognized for the VM. Note that the VMs have to be powered on to retrieve the IP addresses.