There might be a situation that you need to look up an ESXi host with it’s Mac address especially when troubleshooting and tracing network connectivity issues.
Although you can use RVTools report to find the matching ESXi host but sometimes PowerCLI is just there and probably easier to run a single line code to grab the required information.
You can use the below single line PowerCLI to simply find which ESXi host owns the Mac address:
Get-VMHost | Get-VMHostNetworkAdapter |
Where-Object {$_.Mac -eq "00:25:b5:01:00:1b"} |
Select VMHost, Name, DeviceName, Mac
If there is an ESXi host in your vCenter environment that owns that Mac address then it will retrun the Hostname and the NIC name similar to the below:
VMHost Name Mac
------ ---- ---
ESXi01.mylab vmnic9 00:25:b5:01:00:1b