Skip to content

Instantly share code, notes, and snippets.

@MichaelRyom
Created June 15, 2016 19:55
Show Gist options
  • Save MichaelRyom/1aca5cdb16501f50ed6ee4b8e6217b44 to your computer and use it in GitHub Desktop.
Save MichaelRyom/1aca5cdb16501f50ed6ee4b8e6217b44 to your computer and use it in GitHub Desktop.
Get-VMHost | Get-VMHostNetwork | Select HostName,`
@{Name="vmk0";Expression={($_.VirtualNic | where {$_.Name -eq "vmk0"}).mac}},`
@{Name="vmk1";Expression={($_.VirtualNic | where {$_.Name -eq "vmk1"}).mac}},`
@{Name="vmnic0";Expression={($_.PhysicalNic | where {$_.Name -eq "vmnic0"}).mac}},`
@{Name="vmnic1";Expression={($_.PhysicalNic | where {$_.Name -eq "vmnic1"}).mac}}`
| Export-Csv c:\temp\Mac_Address_List.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment