5 Replies Latest reply on Jan 16, 2016 6:31 PM by leaderone2

    How to get ESX ip use get-vm CLI

    leaderone2 Novice

      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}}