PowerShell: Find Duplicate Mac Addresses of Guest VMs in Virtual Machine Manager

Here’s a quick snippet to check whether you have any duplicate mac addresses on existing virtual machines in the cluster:

import-module virtualmachinemanager
$macAddresses=get-vm | Get-VirtualNetworkAdapter | select name,EthernetAddress


$b=$a | select –unique

Compare-object –referenceobject $b –differenceobject $a

Leave a Reply

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