Change the Product Key on Windows Server 2008 via command line

To change the Product Key on Windows Server 2008 and activate it via command line run the following commands:

slmgr.vbs -ckms

The command above removes all KMS keys on the server and will generate the following dialogue box:

20150519151326

Click OK to proceed and then run command below:

slmgr.vbs -upk

This will remove all installed keys on the server and will result in the following dialogue box:

20150519151452

Click OK to proceed and then run command below:

slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

This command installs your new key on the server (replace XXXXX etc with your new Product Key) and will produce the following confirmation:

20150519151552

Click OK to proceed and then run command below:

slmgr.vbs -ato

This command activates the new key and you will see the following activation confirmation:

20150519151724

And that’s it! The Product Key has been changed and activated successfully. If you have to do this many times it makes sense to script this, so the batch file below achieves all the steps above in one go:

::Remove all KMS keys
slmgr.vbs -ckms

::Remove all installed keys
slmgr.vbs -upk

::Install new product key
slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

::Activate new product key
slmgr.vbs -ato

I hope this helps you save a bit of time and energy!

Install Telnet client on Server 2008 & Server 2008 R2

On a fresh build of Server 2008, Server 2008 R2 and Windows 7, the telnet client is not installed so running a normal telnet command will yield the following response:

'telnet' is not recognized as an internal or external command, operable program or batch file

The quickest and easiest way to install the telnet client is to run the following command :

pkgmgr /iu:"TelnetClient"

It installs the client silently in the background and only takes a few seconds after which you can telnet to your heart’s content:

The install can be done via the GUI also by performing the steps listed here.