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
$a=$macAddresses.EthernetAddress
$b=$a | select –unique
Compare-object –referenceobject $b –differenceobject $a
Categories: