In virtualized enterprise environments, every virtual network adapter connected to a virtual switch requires a unique Media Access Control (MAC) address. By default, the Windows 11 Hyper-V hypervisor dynamically allocates MAC addresses to virtual machines from an internally managed global address pool. While dynamic allocation works seamlessly for temporary test machines, production workflows often require predictable, static MAC addresses.
Static MAC assignment is critical when deploying DHCP reservations, enforcing Network Access Control (NAC) authentication, avoiding MAC address collisions across clustered hosts, or configuring software licenses locked to specific hardware addresses. Using PowerShell, administrators can configure host-level dynamic MAC address pools and assign static MAC addresses to individual virtual machines.
Understanding Hyper-V MAC Address Generation
Hyper-V assigns dynamic MAC addresses within the Microsoft Organizationally Unique Identifier (OUI) prefix 00-15-5D. A standard Hyper-V dynamic MAC address is structured into three segments:
- OUI Prefix:
00-15-5D(registered to Microsoft Corporation). - Host Identifier: The next two octets represent a host-specific identifier derived from the host’s primary IPv4 address.
- Host Pool Range: The final octet range spans between
00andFF, providing 256 unique addresses per host by default.
If multiple Hyper-V hosts share identical IP subnets, their automatically generated pools may overlap, resulting in duplicate MAC address warnings. Customising the host range prevents these network collisions.
Inspecting the Current Hyper-V Host MAC Address Pool
Open an elevated PowerShell prompt on Windows 11 and query the host-level MAC address pool configuration:
Get-VMHost | Select-Object Name, MacAddressMinimum, MacAddressMaximum
The command returns the lower and upper hexadecimal boundaries currently allocated to the Hyper-V host:
Name MacAddressMinimum MacAddressMaximum
---- ----------------- -----------------
WIN11-HOST 00155D010A00 00155D010AFF
Modifying the Host Dynamic MAC Address Pool
To prevent pool exhaustion or avoid collisions with other virtualisation hosts, configure a distinct range using the Set-VMHost cmdlet:
Set-VMHost -MacAddressMinimum "00155D200000" -MacAddressMaximum "00155D20FFFF"
Verify that the host settings have updated:
Get-VMHost | Format-List MacAddressMinimum, MacAddressMaximum
Newly created virtual network adapters will now receive dynamic addresses within this expanded 65,536-address space.
Checking a Virtual Machine Adapter MAC Address
To inspect the current MAC address assignment and mode for a specific virtual machine (such as “AppServer-01”):
Get-VMNetworkAdapter -VMName "AppServer-01" | Select-Object VMName, Name, MacAddress, DynamicMacAddressEnabled
If DynamicMacAddressEnabled returns True, the hypervisor may reassign a different MAC address if the adapter is disconnected, moved, or rebuilt.
Assigning a Static MAC Address to a Virtual Machine
To assign a permanent, static MAC address to a virtual machine, specify the address string and pass -StaticMacAddress to Set-VMNetworkAdapter. The virtual machine can be running or powered off:
Set-VMNetworkAdapter -VMName "AppServer-01" -StaticMacAddress "00-15-5D-20-AA-01"
Format the MAC address using standard hyphen-delimited, colon-delimited, or unformatted hexadecimal strings (e.g. 00155D20AA01). PowerShell normalises the address automatically.
Verify that the static MAC address is active:
Get-VMNetworkAdapter -VMName "AppServer-01" | Select-Object VMName, MacAddress, DynamicMacAddressEnabled
DynamicMacAddressEnabled will now display False, guaranteeing that the address remains fixed across reboots, host migrations, and network switch reconnects.
Reverting a Virtual Machine to Dynamic MAC Allocation
If a static reservation is no longer needed and you wish to return the virtual adapter to automatic pool management, pass the -DynamicMacAddress switch parameter:
Set-VMNetworkAdapter -VMName "AppServer-01" -DynamicMacAddress
Confirm the change:
(Get-VMNetworkAdapter -VMName "AppServer-01").DynamicMacAddressEnabled
The command returns True, and the adapter immediately claims a dynamic address from the host pool.
Auditing MAC Addresses Across All Virtual Machines
To prevent conflicts across your virtual infrastructure, generate a comprehensive report of all assigned MAC addresses and their allocation modes across all local virtual machines:
Get-VM | Get-VMNetworkAdapter | Select-Object VMName, SwitchName, MacAddress, DynamicMacAddressEnabled | Sort-Object MacAddress | Format-Table -AutoSize
By effectively managing host pool ranges and applying static MAC addresses through PowerShell, systems engineers ensure clean network segmentation, reliable DHCP leasing, and robust security policy compliance across Windows 11 Hyper-V environments.