Activate Windows Server 2019 with KMS or Command Line

Microsoft has added a wide range of cloud-based features to Windows Server 2019, but the first step to the cloud may stumble for administrators who encounter activation issues with the server’s operating system.

Windows Server 2019 requires license activation after 180 days, otherwise the system will shut down. With multiple server workloads, it is not efficient to log in to each machine and activate them manually. There are also times when entering a valid key from the Volume Licensing Service Center (VLSC) does not work. Errors and key rejections can occur, often for no apparent reason. To avoid frustration with the server GUI, it helps to learn how to license Windows Server 2019 via alternative methods such as command line or Key Management Services (KMS).

Why use Windows Server 2019?

A move to Windows Server 2022 might be a bit premature for many organizations that would prefer a more proven server operating system, while Windows Server 2016 might lack the more advanced features that some businesses seek.

Windows Server 2019 offers significant improvements and a few years of updates that should appease even the most wary administrators who prefer stability over cutting-edge features. Some advantages of Windows Server 2019 over Windows Server 2016 include:

  • a unified management center for ecosystem networking and monitoring;
  • scalable and expanded storage up to 64TB, plus replication for disaster recovery;
  • better performance in Storage Space Direct – up to twice as fast according to Microsoft – thanks to improvements in mirror-accelerated parity; and
  • cloud-based file cookie sharing.

Perhaps more fundamentally, Windows Server 2016 was not designed for hybrid environments, which makes data management trickier for administrators.

Windows Server 2019 also incorporates two modern technologies: support for AI and IoT. Windows Server 2019 uses artificial intelligence for smarter, analytics-based predictions. Microsoft added this feature to help administrators reduce operating costs. Devices on connected IoT platforms, such as servers and machines, can share and back up data seamlessly.

Microsoft updated Server 2019’s security features, added better support for Linux virtual machines, changed subsystem containers for easier development, and updated its Remote Desktop Services feature. This new version also integrates with Windows Admin Center.

But the key to unlocking all these features is to activate Windows Server 2019 to avoid downtime after deployment.

Activation via command line and Software License Manager

Elevated command line access is a reliable way to access the Software License Manager (SLMGR), also known as the Windows Software License Management Tool. Interacting directly with SLMGR manages activation and access to license information.

There are potential issues with working through the command line. Accidental commands usually generate an error message, but it is possible to harm the environment. Some SLMGR settings can also modify registry information. Double-check the command before running it to avoid problems.

This SLMGR uses parameters to provide specific instructions. Parameters act as extensions and use the following format: slmgr/[parameter].

SLMGR settings retrieve license information, modify license information, and perform activation for Windows Server 2019.

Here are some common SLMGR settings:

  • /dli: displays basic license and activation information;
  • /dlv: displays detailed license and activation information;
  • /xpr: displays the expiration date of an installed license;
  • /upk: uninstalls the existing license key;
  • /cpky: remove license key information from registry;
  • /ipk [XXXXX-XXXXX-XXXXX-XXXXX-XXXXX]: change the 25-digit license key or try to activate the license if the provided key does not currently work; and
  • /ato: forces immediate online activation, which is especially useful when KMS servers or Microsoft’s VLSC online activation servers are not accessible.

The main extension used with Windows Server 2019 activation is /ipkoften used in case of problems using the VLSC.

Activate Windows Server 2019 with Command Line

The following example command activates a license key. Navigate to the system32 folder from the command line, replace the Xs with the 25-digit license key, and press Enter to run the command:

slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

A pop-up dialog will indicate if the operation failed or succeeded. Microsoft recommends a server restart after a successful activation attempt. After a reboot, Server Manager will show the server enabled.

If a server is missing from Server Manager, there may be an activation error. Open the command line and enter the slmgr/ato order. A Windows Script Host pop-up window will display an error message explaining why the multiple activation key was invalid. Use another activation key or contact Microsoft for assistance.

KMS is an alternative activation method

Another way to handle VLSC activation is to use KMS, a client-server model for volume activation.

KMS clients connect to a KMS server, also known as a KMS host, on the network for activation. A KMS host can be a virtual machine or a physical machine. To activate a computer running Windows Server 2019, the KMS host must use one of the following operating systems: Windows Server 2012 R2, Windows Server 2016, or Windows Server 2019.

How to find and use the KMS Host license key

Setting up a KMS host requires obtaining the KMS host key. Use the following steps to enable the KMS host:

  1. On the VLSC website, go to License > Relationship Summary > Click Current Active License ID > Product Keys and copy it Windows Server 2019 DataCtr/Std KMSfrom the list of keys.
  2. Open command prompt, type slmgr/ipk followed by the 25-digit KMS host product key and press Enter. Then use slmgr/ato to activate the host key.

The server also needs the Volume Activation Services server role installed from Server Manager or via this PowerShell command:

Installer-WindowsFeature -Name VolumeActivation -IncludeManagementTools

The KMS host should then advertise its presence on the network to KMS clients, such as a Windows Server 2019 machine. The KMS client should activate automatically, which remains valid for 180 days until it renews the activation via KMS host.

Comments are closed.