Sunday, January 10, 2010

Windows Server 2008 and Windows Activation

I recently built a new virtual machine running Windows Server 2008 R2 using volume license media.  I knew that the client already had a Key Management Service (KMS) server on their network to manage the activations of all of their Server 2008, Vista, and Windows 7 clients.  When I clicked on the "Activate Windows" link in the "Initial Configuration Tasks" window, I was surprised to see that my only option was to enter a product key when I clicked.  There wasn't any option to specify the name of their KMS server.



It turns out that you have to run a few command-line tools to tell Windows which Key Management Service machine to use and to then activate Windows without using a product key.  First, it's always a good idea to display the current license information by issuing the following command in a command prompt:

slmgr.vbs -dli

You should see a window such as the following which basically confirms that the product has not been registered:



Now, issue the following command to set the name of the Key Management Service host to use, in this case, server.domain.com:

slmgr.vbs –skms server.domain.com

Of course, if you get an error message such as the following, you'll need to right-click on the Command Prompt icon in your Start Menu, select the Run as administrator option and re-issue the command.



If the command completed successfully, you should see a prompt such as the following:



(Note that the actual name of the KMS server was removed from the graphic above.  If entered correctly, the name should appear immediately after the word "to" in the first line of the message.)

Finally, to complete the activation, you need to enter the following command:

slmgr.vbs –ato

If the registration was successful, you should receive a confirmation such as the following:



If you get an error message similar to the following instead, either you entered the wrong host name or the KMS service on that server could not be reached.



If you are not sure whether you have the correct server name, you could also try to locate the correct server name using the following nslookup commands:

nslookup
set type=srv
_vlmcs._tcp.domain.com

If a Key Management Service has been registered with the domain, it should be listed in the "srv hostname" field.

No comments:

Post a Comment