You sometimes need to list and get all MAC addresses of all Hyper-V virtual machines in your network. Either for your Hyper-V administration or provisioning if you don’t set an unique MAC address automatically. Here is how to get all those MAC addresses easily with PowerShell.
How to list all MAC address of all VM’s on Hyper-V. This tip shows you how to list MAC addresses on local or remote Hyper-V servers.
A media access control address (MAC address) of a computer is a unique identifier assigned to network interfaces for communications at the data link layer of a network segment. MAC addresses are used as a network address for most IEEE 802 network technologies, including Ethernet and WiFi. Logically, MAC addresses are used in the media access control protocol sublayer of the OSI reference model.
Wikipedia
A MAC address can be assigned manually by you, or automatically by Hyper-V. If you ever need to list all MAC addresses, use the Get-VM
and Get-VMNetworkAdapter
PowerShell cmdlets as shown in the following example:
On your local Hyper-V host, list the MAC addresses of all virtual machines (VM’s):
Get-VM | Get-VMNetworkAdapter | ft VMName, MacAddress
Code language: PowerShell (powershell)
To list MAC addresses of all virtual machines on all Hyper-V servers, run the following code in your PowerShell console:
$HypervServers = @("HyperV-01", "HyperV-02", "HyperV-03")
foreach ( $HypervServer in $HypervServers ) {
Get-VM -Computername $HyperVServer | Get-VMNetworkAdapter | ft VMName, MacAddress
}
Code language: PowerShell (powershell)
Or on a per remote Hyper-V server basis, run:
Get-VM -Computername hyper-v_server | Get-VMNetworkAdapter | ft VMName, MacAddress
Code language: PowerShell (powershell)
More neat PowerShell Hyper-V tricks:
- Get Hyper-V guest serial number with PowerShell
- Get current number of FTP client connections (NonAnonymous) with PowerShell and Get-Counter
Show Your Support

If you want to step in to help me cover the costs for running this website, that would be awesome. Just use this link to donate a cup of coffee ☕($10 USD or €10 EUR for example). And please share the love and help others make use of this website. Thank you very much! <3 ❤️
Hi Tamara, thank you for your question.
I had to google it a bit for you, because I didn’t had a PowerShell command ready. The first you can try is this example (it’s self explanatory):
However, in my situation, where I used Windows Server 2019's
Get-VM
to connect to Server 2012R2 Hyper-V servers, this gave me an error:Reading up on Thomas Maurer's PowerShell direct in Hyper-V, I changed my code a bit and successfully tried (it's not perfect!):
HTH!
Hi, I have some virtual machines and I don’t know where it was installed, one in particular.
I searched the servers, but I can’t find that VM.
I thought the Mac could help me, but no. What makes a VM and its husped team unique?
I have your IP and your name. What do you recommend to find it?