Activating Windows from Command Line

Instead of messing with the notoriously unreliable gui to activate windows, instead use the slmgr.vbs script via command line.

The slmgr.vbs script allows you to work with your Windows Server product keys in different ways depending on the parameter that you use along with it.

We will use these 2 parameters:

  • -ipk – this parameter or switch is used to install product key – 25 characters long including dashes
  • -ato – this parameter is used to complete the activation of the product key

Installing the product key you will need to issue this command:

slmgr.vbs -ipk 12345-12345-12345-12345-12345

If all is good you will see a dialog box that tells you the product key is installed successfully. Click OK to finish.

In next step you will need now to run same command with the second parameter to activate the product key for the server:

slmgr.vbs -ato

If the activation is successful, you should see a dialog box that says the product was activated successfull

This entry was posted in Uncategorized. Bookmark the permalink.