I am trying to get all IP addresses on a vm and the associated portgroup.
$vm.Guest.IPAddress
I have the Vlan
$vmvlan = Get-VirtualPortgroup -VM $_.Name | %{$_.VlanId}
Now if there are more than 1 Vlan I can get it like this
$vmvlan[0]
$vmvlan[1]
Does anyone know how can I do the same for the IP addresses?