Hyper-V PowerShell Windows Server 2012 R2 Windows Server 2016 Windows Server 2019

Hyper-V: Automatic Virtual Machine Activation

With the release of Windows Server 2012 R2 back in 2013, Microsoft introduced a feature called Automatic Virtual Machine Activation (AVMA). AVMA handles the activation process of any of your Hyper-V virtual machines (VMs) running on a physical Hyper-V host which is properly licensed with a Windows Server Datacenter license. In this way you do not have to deal with managing the product keys for each individual VM.

The VM activation process, which binds the VMs activation to the licensed Hyper-V host, takes place during the startup process of the VM. Because the activation takes place between the VM and the Hyper-V host it resides on, you are even able to license VMs in completely isolated environments or remote locations without any Internet connection. When the guest OS is activated, it only rechecks its activation against the host until the next VM reboot, or after 7 days.

Requirements for AVMA

  • A Hyper-V host running a Datacenter Edition of Windows Server 2012 R2Windows Server 2016 or Windows Server 2019. Keep in mind that if you migrate an AVMA licensed VM to a Hyper-V host which is not licensed with a Windows Server Datacenter license, the VM will become unlicensed. In this case you should replace the AVMA key in the VM with another valid non AVMA license key.
  • The Hyper-V Data Exchange Service (KVP), which is part of the Integration Services must be enabled on the VM.
  • In the VM itself the Microsoft Hyper-V Activation Component Driver should have an enabled device status and should be working properly.
  • AVMA does not work with other Virtualization Server technologies.

Supported Guest Operating Systems for AVMA

Only Windows Server guests are covered by AVMA. The below table shows which guests can be activated by each different Hyper-V host version. All server editions (Datacenter, Standard or Essentials) installed with Desktop Experience or Server Core can be activated.

Hyper-V host versionWS2019WS016WS2012R2
Windows Server 2019XXX
Windows Server 2016 XX
Windows Server 2012 R2  X

* AVMA in Windows Server 2019 can also activate Windows Server version 1809, 1803 and 1709.

AVMA Keys

Windows Server 2019

EditionAVMA key
DatacenterH3RNG-8C32Q-Q8FRX-6TDXV-WMBMW
StandardTNK62-RXVTB-4P47B-2D623-4GF74
Essentials2CTP7-NHT64-BP62M-FV6GG-HFV28

Windows Server version 1809

EditionAVMA key
DatacenterH3RNG-8C32Q-Q8FRX-6TDXV-WMBMW
StandardTNK62-RXVTB-4P47B-2D623-4GF74

Windows Server version 1803 and 1709

EditionAVMA key
DatacenterTMJ3Y-NTRTM-FJYXT-T22BY-CWG3J
StandardC3RCX-M6NRP-6CXC9-TW2F2-4RHYD

Windows Server 2016

EditionAVMA key
DatacenterTMJ3Y-NTRTM-FJYXT-T22BY-CWG3J
StandardC3RCX-M6NRP-6CXC9-TW2F2-4RHYD
EssentialsB4YNW-62DX9-W8V6M-82649-MHBKQ

Windows Server 2012 R2

EditionAVMA key
DatacenterY4TGP-NPTV9-HTC2H-7MGQ3-DV4TW
StandardDBGBW-NPF86-BJVTX-K3WKJ-MTB6V
EssentialsK2XGM-NMBT3-2R6Q8-WF2FK-P36R2

Configure AVMA

First of all, you should verify that the Data Exchange option is enabled in the Integration Services for the VM.  To ensure this open Hyper-V Manager and right-click the VM and click on Settings…


On the Settings Windows, under Management select Integration Services and verify that Data Exchange is marked.


You can also use PowerShell to see if the Data Exchange Integration Service (Key-Value Pair Exchange) is enabled. To get a list of the running Integration Services of a VM, run the following command (replace the VM name by your own) in a PowerShell window (as Administrator) on the Hyper-V host hosting the VM.

Get-VMIntegrationService -VMName "vm-tmpl-W2k19"

To enable the Data Exchange Integration Service when disabled, run the following PowerShell cmdlet (as Adminstrator) from the Hyper-V host hosting VM.

Enable-VMIntegrationService -Name "Key-Value Pair Exchange" -VMName "vm-tmpl-W2k19"


When you have any issues with activation and you need to troubleshoot, you can also verify if the Microsoft Hyper-V Activation Component Driver is working properly. To do so open Device Manger inside the VM and check the Device Status of the driver.

To install an AVMA key in a VM (in my example for a Windows Server 2019 VM), run the following command in a PowerShell window (as Administrator) on the VM:

slmgr /ipk TNK62-RXVTB-4P47B-2D623-4GF74


*The AVMA key can also be provided during an Unattended setup using a unattend.exe setup file. In this way the key is already injected during the build phase of that particular VM.

You can also use PowerShell Direct from the Hyper-V host to activated a specific AVMA key for a VM running on that host. Open a PowerShell window (as Administrator) on the Hyper-V host and run following command:

Invoke-Command -VMName "vm-tmpl-W2k19" -ScriptBlock {slmgr /ipk TNK62-RXVTB-4P47B-2D623-4GF74}


You can verify the correct installation of the AVMA key, by opening All settings – Update & Security – Activation in the VM.


You can also verify the VM’s AVMA activation status on the Hyper-V host by opening the Event Viewer and searching for Event ID 12310.



I hope this blog post did learn you something about AVMA and that this feature eases your VM activation process. If you have any questions, always feel free to contact me through my twitter handle (@wmatthyssen) or feel free to leave a comment.

0 comments on “Hyper-V: Automatic Virtual Machine Activation

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: