How to find a specific MAC Address inside your vSphere

Sometimes we need to find a specific mac address within the vSphere, I used Orchestrator to perform this task.When you have large number of VMs in your environment it will be a time consuming task to check every vm MAC Address.

You just need to create a work flow as shown in the previous posts, and add a Script element and type this script within this:
You should just change the below MAC Address with your excact MAC Address.

var vms =  VcPlugin.getAllVirtualMachines();
for each (vm in vms){
for each (nic in vm.guest.net) { 
if (nic.macAddress == "00:50:56:88:0b:6a" )
{
System.log(vm.name)
System.log(nic.macAddress)
} 
}
}

Leave a Reply

Your email address will not be published. Required fields are marked *

− 3 = 3