Posted On July 15, 2022

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

kimconnect 0 comments
blog.KimConnect.com >> Codes , Virtualization >> 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

$a=$macAddresses.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 *

Related Post

ARP MAC to IP Resolution

If entry already exists on the ARP table:arp -a | find "XX-XX-XX-XX-XX-XX"If entry does not…

How to Import Files Into a Docker Container

1. Use SCP to copy files to the remote server while logged onto the local…

PowerShell: How to Quickly Ping a Target

Method 1: Legacy ping command # Legacy method that works without any fusses $pingResult=ping google.com…