VMware Cloud Community
simonsmith06
Contributor
Contributor

export vm mac addresses

Hey all

Can anyone advise me on how I can export the mac addresses of all VM's on a host?

Cheers

Simon

Reply
0 Kudos
3 Replies
a_p_
Leadership
Leadership

Depending on your needs, you may be able to accomplish this with RVTools (http://www.robware.net/)

André

Reply
0 Kudos
cougar694u
Enthusiast
Enthusiast

Poweshell:

$vms = Get-VMHost esx_hostname | get-vm

foreach ($VM in $vms){$vnic = Get-NetworkAdapter (get-vm $vm); Write-host $vm "has MAC: " $vnic.MacAddress}

~Luke

http://thephuck.com

~Luke http://thephuck.com
Reply
0 Kudos
SimonStrutt
Enthusiast
Enthusiast

If you don't mind using the PowerCLI, try the following...

Get-VM | Get-NetworkAdapter | Select Parent, MacAddress
"The greatest challenge to any thinker is stating the problem in a way that will allow a solution." - Bertrand Russell
Reply
0 Kudos