Find Hyper-V Virtual Machine by MAC Address – 60 Second Solutions

Today I had to try and find a virtual machine given its MAC address on a non-clustered Hyper-V environment. Here’s a quick PowerShell script to do just that! import-module hyper-v $Servers = @(“server1”,“server2”,“etc”) $results = @() foreach ($hvs in $Servers) { Get-VM –Computername $hvs | Get-VMNetworkAdapter | select VMName, MACAddress ,ComputerName | foreach-object { $out […]