Windows Activation on AWS fails

Sometimes it may happen that a Windows Server fails with the Windows activation when this virtual machine runs on AWS. I’ve stumbled across this issue from time to time, and with some research and trial & error, I was able to fix it. I haven’t been able to figure out what is causing this problem yet. But at least there is a solution that works. The solution is to activate Windows manually, and maybe “force it to its luck”. The following steps should help you to solve such a Windows activation issue.

Activate Windows manually

NOTICE: This guide is for Windows Server 2016 and later.

Reset Windows Activation

  1. Start the Windows Registry Editor as administrator (right-click → run as administrator)
  2. Navigate to the following location:
    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform
  3. Go to the right panel and right-click on SkipRearm
  4. Select the Modify option and a dialogue box Edit DWORD 32-bit folder should appear
  5. Here set the Value Data to 1 and click the Ok option
  6. Restart the server now
    It is important to restart the server at this step. Otherwise, the next steps will not work.

Reset Windows Activation timers

  1. Now go to the Start menu, and search for Powershell
  2. Select the run as an Administrator option
  3. Type the following command and press Enter:
    slmgr.vbs /rearm
  4. Restart the server now
    It is important to restart the server at this step. Otherwise, the next steps will not work.

Finally activate Windows

  1. Now go to the Start menu, and search for Powershell
  2. Select the run as an Administrator option
  3. Run the following commands:
    1. Press enter after each command
      Import-Module "C:\ProgramData\Amazon\EC2-Windows\Launch\Module\Ec2Launch.psd1"
      
      Add-Routes
      
      Set-ActivationSettings
      
      slmgr /ato
  4. It might be needed to add a Generic Volume License Keys (GVLK) here. To get the key for the correct operating system, you may visit this Microsoft article.
  5. Enter the following command and press Enter
    slmgr.vbs /ipk N69G4-B89J2-4G8F4-WWYCC-J464C
  6. Set the KMS server to the AWS KMS server with the following command:
    slmgr.vbs /skms 169.254.169.250:1688
  7. Run the next command to activate Windows:
    slmgr /ato

Information sources

The following guides and articles have been used to write this troubleshooting guide.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.