Skip to content

Instantly share code, notes, and snippets.

@jbarber
Created October 12, 2010 11:23
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/622029 to your computer and use it in GitHub Desktop.
Save jbarber/622029 to your computer and use it in GitHub Desktop.
Find all the ethernet MACs
get-view -viewtype virtualmachine | %{
$vm = $_.name
$vm.mac = @()
$_.Config.Hardware.Device | ?{ $_.MacAddress } | %{ $vm.mac += $_.MacAddress };
$vm
} | format-table -wrap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment