How to Activate Windows Server 2019 Using the slmgr.vbs Command Line Tool

Reading Time: 4 minutes

Share:

Microsoft released their newest version of their server operating system almost one year ago on October 2, 2019. I have had Windows Server 2019 running in my lab environment since November 2018. It is certainly not advisable to be on the bleeding edge of technology in your production environment and to test thoroughly any new product before committing to it. Major version releases of operating systems are one such technology that falls squarely into that category.

Here is Microsoft’s comparison chart between 2008 R2, 2012 R2, 2016 and 2019: https://www.microsoft.com/en-us/cloud-platform/windows-server-comparison.

On the surface, Windows Server 2019 looks just about like Windows Server 2016. There aren’t many changes to the user interface between the two operating system environments either so if you are already used to Windows Server 2016, Windows Server 2019 is a familiar face. It is mature enough now after being a year old that I have been putting it into client production environments.

Note: Remember with every major release version change of operating systems (2003 & 2003 R2, 2008 & 2008 R2, 2012 & 2012 R2, 2016, and now 2019) in addition to the basic server licensing, corresponding user CALs (Client Access Licenses) are required to go along with them.

Once you have logged into the Microsoft Volume License Center and acquired the key needed to activate the operating system, it should be as simple as opening Server Manager, navigating to the Local Server page, clicking the Not activated link and punching in the key, right?

activate windows server 2019

With a few recent installations of Windows Server 2019 I have found that even when I’m 100% sure I’ve copy/pasted or typed in the key correctly, it is still not accepted and consequently not activated. Instead of using the GUI, repeatedly unsuccessfully, I have found the command line tool to do the same to be dependably effective. The tool is the Windows Software Licensing Management Tool and can be accesses via elevated command line using slmgr.vbs.

There are a variety of parameters to use with slmgr.vbs including:

  1. /dli (This will show basic license and activation information.)
  2. /dlv (This will show detailed license and activation information.)
  3. /xpr (This will show the current expiration date of the license installed which is most useful when using a KMS key with a local KMS activation server on the network.)
  4. /upk (Be careful with this one as it will uninstall your current license key.)
  5. /cpky (Also be careful with this one as this removes license key information from the registry.)
  6. /ipk *****-*****-*****-*****-***** (This will change your license key to the one entered. If there was no key entered previously this command will also attempt to activate the license based on the license key type.)
  7. /ato (This will force an online activation immediately. This could be useful if you have already entered the new key but was not online with either the KMS server for the network or unable to reach Microsoft’s activation servers.)

When a new installation of Windows Server 2019 that is not accepting the key from the GUI, the /ipk parameter is what we would use. From an elevated command prompt, enter (where the asterisks are your actual license key):

slmgr.vbs /ipk *****-*****-*****-*****-*****

activate windows server 2019Microsoft recommends restarting your server following using this command. Doing these in combination should show an activated server from Server Manager on next boot.

If it does not, run this from an elevated command prompt:

slmgr.vbs /ato

It will likely give you an error with a reason why it wasn’t able to activate using the provided key like this for example:

Activating Windows (R)

An issue like the one above will need to be rectified by either using a different MAK key that has activations left, or a call into Microsoft.

Do you have questions? Don’t hesitate to reach out to our IT experts for help!

This publication contains general information only and Sikich is not, by means of this publication, rendering accounting, business, financial, investment, legal, tax, or any other professional advice or services. This publication is not a substitute for such professional advice or services, nor should you use it as a basis for any decision, action or omission that may affect you or your business. Before making any decision, taking any action or omitting an action that may affect you or your business, you should consult a qualified professional advisor. In addition, this publication may contain certain content generated by an artificial intelligence (AI) language model. You acknowledge that Sikich shall not be responsible for any loss sustained by you or any person who relies on this publication.

SIGN-UP FOR INSIGHTS

Join 14,000+ business executives and decision makers

Upcoming Events

Upcoming Events

Latest Insights

About The Author