22 August 2013

How to Change your Product Key on Windows Server 2008 R2

Greetings blog-sphere inhabitants!

Here is a quick post with some useful info on product keys on the CLI of windows server 2008.

I was tasked at work to take a copy of a Hyper-V terminal server from a active server and make it into a new server to use as a back up to the main server in which this new one was a copy of.
So, piece of cake, Right? So I do an export of the Hyper-V session, move it to the new physical host and fire it up without a network connection. Change the IP, hostname, etc. Golden, except the windows product key. I do some digging around and find no easy way to do this at first, CRAP!

Well its tech net to help here, I found a VBS to help with this little project. In doing so I found it to be very useful in troubleshoot problems with product keys as well!

The script is located on all installs in C:\windows\system32 and is named slmgr.vbs. Blow are some screenshots of the options for the script.


As you can see thing little script does a hell of a lot!
To replace the current key use the following commands.
slmgr.vbs /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
(replace the xxxxx with your product key)
The /ipk option, as you can see above, Replaces the current key with the new entered key.
I then,
slmgr.vbs /dlv
slmgr.vbs /dli
These two commands will give you the key info as well as tell you if the key is active or not. You can then activate the key.
Now, the script says it can do this with the /ato options, it lies. You need to use the command slui.exe which will bring the activations wizard up. Make sure you have a connection the net before you do this.

Once you get that all done you are ready to go.
This worked out great because when I change the product key on the server, the DC saw it as an all new server. But there was no installtion to do, everything I needed was already there and ready to go.

I hope this was a helpful post, it was useful info to me.

Until next time, keep on hacking!!!