Skip to content

Instantly share code, notes, and snippets.

@vmwarecode
Created January 11, 2016 14:24
Show Gist options
  • Select an option

  • Save vmwarecode/a687c875ff4c1b240f06 to your computer and use it in GitHub Desktop.

Select an option

Save vmwarecode/a687c875ff4c1b240f06 to your computer and use it in GitHub Desktop.
Get ESXi Host ip from VM perspective
Get-VM | Select Name, id, @{Name="IP"; Expression={$_.VMHost | Get-VMHostNetwork | Select -ExpandProperty VirtualNic | where {$_.PortGroupName -match "dvpgManagement"} | Select IP}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment