Duplicate mac addresses can result in strange situations in your environment, losing connections etc.
This is a simple script to filter all the duplicate mac addresses.
1 2 |
import-module virtualmachinemanager Get-VirtualNetworkAdapter -All | where {$_.PhysicalAddress -ne $null} | group -Property PhysicalAddress | ? {$_.Count -gt 1} | % {$_.Group} | Select-Object Name, PhysicalAddress |