If you are running Hyper-V on Windows Server 2016 DataCenter, then one nice feature is that you can activate VMs running a Server Standard / DataCenter guest OS using a special “Automatic Virtual Machine Activation” key.
The keys are:
Operating System | Key |
---|---|
Windows Server 2012 R2 Essentials | K2XGM-NMBT3-2R6Q8-WF2FK-P36R2 |
Windows Server 2012 R2 Standard | DBGBW-NPF86-BJVTX-K3WKJ-MTB6V |
Windows Server 2012 R2 Datacenter | Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TW |
Windows Server 2016 Essentials | B4YNW-62DX9-W8V6M-82649-MHBKQ |
Windows Server 2016 Standard | C3RCX-M6NRP-6CXC9-TW2F2-4RHYD |
Windows Server 2016 Datacenter | TMJ3Y-NTRTM-FJYXT-T22BY-CWG3J |
So naturally, I incorporated it as a step in my Task Sequences for Server deployments.
First, I created a Group called “VM Guest Actions” and gave it the following condtions:
This ensure the following steps only apply to Virtual Machines..
For each step in this group we also need to ensure it only applies to qualifying VMs – in this case – 2016 DataCenter
Apply this to all steps in the group – changing the condition as appropriate for your Server OS.
First step we need is to assign the AVMA key, so create a new Command Line step with the following command:
1 |
cscript //b C:\Windows\System32\slmgr.vbs /ipk TMJ3Y-NTRTM-FJYXT-T22BY-CWG3J |
Remember to replace the key for your version of windows..
Next step is to activate the key:
So, again, we need another Command Line step with the following command:
1 |
cscript //b C:\Windows\System32\slmgr.vbs /ato |
Again, remember to filter it for your desired OS Version.
Done!
Now when, you build a server OS and its a VM on a DataCenter Host, it will get activated.