Recovering Windows Server Licences from Key Management Server (KMS) on Amazon EC2

A couple of ways of recovering Windows licences from KMS on Amazon. 

Method 1: Re-enable Windows Activation Plugin and Restart Ec2Config Service

To re-enable the EC2 Activation plugin, do the following:

  1. Stop the Ec2Config service via the Service Control Manager.
  2. Open C:\Program Files\Amazon\Ec2ConfigService\Settings\config.xml with a text editor.
  3. Change the “Ec2WindowsActivate” plugin state to “Enabled” (case sensitive).
  4. Save changes.
  5. Start the Ec2Config service.
  6. Check the output of the log file located at C:\Program Files\Amazon\Ec2ConfigService\Logs\Ec2ConfigLog to verify success:
Waiting for background plugin to complete: Ec2WindowsActivate
Ec2WindowsActivate: Setting KMS to: 169.254.169.250:1688
Ec2WindowsActivate: Product Activation Successful.
Background plugin complete: Ec2WindowsActivate
Sending configuration complete event.
Windows is Ready to use

In case this fails, make sure you have an up-to-date Ec2Config version.

Method 2: Set up KMS Server’s Address

Verify the system clock is set to sync with time.windows.com.

Open the command prompt, and enter the following lines:

C:\> slmgr.vbs /skms ec2-79-125-16-172.eu-west-1.compute.amazonaws.com:1688
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Key Management Service machine name set to ec2-79-125-16-172.eu-west-1.compute.amazonaws.com:1688 successfully.
C:\> slmgr.vbs /ato
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Activating Windows Server(R), ServerDatacenter edition (68e6b220-cf09-l00p-l00p-45cd964b9509) ...
Product activated successfully.

You should get two confirmations as above.

KMS Servers Addresses for EU West (Ireland)

Any address below should work fine.

  1. ec2-79-125-16-172.eu-west-1.compute.amazonaws.com
  2. ec2-79-125-16-108.eu-west-1.compute.amazonaws.com

Leave a Reply

Your email address will not be published. Required fields are marked *