I want to use Get-vm command to get ESX ip, the sample is show below, But it cannot get the EsxIP but the ESX-name,It may has some grammar Error. Who can help me on this, Thanks
I donot want to use get-vmhost command,because it would be very slow
Get-VM | Select Name,id, `
@{Name=’ESXIP’;Expression={$_.VMHost | Select ($_.ExtensionData.Config.Network.Vnic | ? {$_.Device -eq "vmk0"}).Spec.Ip.IpAddress}}