Simple script will find VM by the mac adderss
If you have some MAC address and need to find correct vm related or check is ther is some duplicate vms with same MAC address please yse below script to do it.
###############VM by MAC address finder #########################
$report =@()
Get-VM | Get-View | %{
$VMname = $_.Name
$_.guest.net | where {$_.MacAddress -eq “00:50:56:91:0e:0f“} | %{
$row = “” | Select VM, MAC
$row.VM = $VMname
$row.MAC = $_.MacAddress
$report += $row
}
}
$report
Please Comment and Subscribe