Activating Windows via the command line with a MAC key

There are times when you need to activate Windows via the command line (even when you are running the GUI version of Windows Server). This can easily be done using a couple of the built in command line tools.

Start and elevated Command Prompt window:


First you need to enter you MAC product Key (this is the 5×5 MAC key provided by Microsoft):


You will receive a confirmation message: “Installed xxxxx-xxxxx-xxxxx-xxxxx-xxxxx successfully.”

Once you have entered your product key you will need to retrieve your Installation ID to provide to Microsoft

Enter the command:


This will display the usual 54 digit number (9 x 6 digits) you get if you try to  activate Windows using the normal GUI method (apart from the dashes) I normally copy this out of Command Prompt and into notepad so I can split it up and make the text larger so it’s easier to read.

You now need to phone Microsoft to enter the installation ID and receive your confirmation key. If you don’t know the telephone number for your country you can find it in a file called phone.inf (located for me in %windir%\System32\SPPUI) for the UK it is: 0800 018 8354 / +44 203 147 4930.

You will need to make a note of the confirmation key and then enter it into the Command Prompt with the  SLMGR switch /atp

CSCRIPT SLMGR.vbs /atp xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

You should then see a confirmation stating that the key has been deposited successfully.

To confirm you are now licenced you can run the command:

Cscript.exe %systemroot%\system32\Slmgr.vbs –dlv


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s