Windows Server 2019

How to activate Windows Server Core 2019 from command line

After you’ve logged into Windows Server Core, you’re presented with the Command Prompt. From there, you can activate your copy of Windows. First, you
have to set the key. You do this with the Windows Server License Manager script, slmgr.vbs.
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
  1. Installing the product key you will need to issue this command:
    1
    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.

  2. In next step you will need now to run same command with the second parameter to activate the product key for the server:
    1
    slmgr.vbs -ato

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

 

Leave a Reply