Skip to content

Instantly share code, notes, and snippets.

@jbarber
Created November 22, 2010 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbarber/709833 to your computer and use it in GitHub Desktop.
Save jbarber/709833 to your computer and use it in GitHub Desktop.
Create /etc/hosts listing for VMware hosts
get-view -viewtype HostSystem | %{
$_ | select-object @{ Name = "IP"; Expression = { $_.config.network.consolevnic | %{ $_.spec.ip.ipaddress } } },name
} | format-table -hidetableheaders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment