Microsoft added a wide range of cloud-based features to Windows Server 2019, but the first step to the cloud can trip up admins who encounter activation problems with the server OS.
Windows Server 2019 requires license activation after 180 days, otherwise the system will shut down. With multiple server workloads, it's not efficient to log in to each machine and manually activate them. There are also times when entering a valid key from the Volume Licensing Service Center (VLSC) will not work. Errors and key rejection can happen, often for no apparent reason. To avoid frustration with the server GUI, it's beneficial to learn how to activate the Windows Server 2019 license through alternative methods such as the command line or Key Management Services (KMS).
Why use Windows Server 2019?
A switch to Windows Server 2022 might be a bit premature for many organizations who might prefer a more battle-tested server OS, while Windows Server 2016 might lack the more advanced functionality sought by some companies.
Windows Server 2019 offers important enhancements and a few years of updates that should placate even the wariest of admins who prefer stability over cutting-edge features. Some advantages in Windows Server 2019 over Windows Server 2016 include:
- a unified management center for both networking and ecosystem monitoring;
- scalable, expanded storage up to 64 TB, plus replication for disaster recovery;
- better performance in Storage Space Direct -- up to two times faster according to Microsoft -- through improvements in mirror-accelerated parity; and
- cloud-based file witness sharing.
Perhaps most fundamentally, Windows Server 2016 was not built for hybrid environments, making data management trickier for admins.
Windows Server 2019 also bakes in two modern technologies: AI and IoT support. Windows Server 2019 uses artificial intelligence for smarter predictions based on analytics. Microsoft added this feature to help admins lower operating costs. Devices on connected IoT platforms, such as servers and machines, can seamlessly share and back up data.
Microsoft updated Server 2019's security features, added better support for Linux VMs, tweaked subsystem containers for easier development and updated its Remote Desktop Services functionality. This newest version also integrates with Windows Admin Center.
But the key to unlocking all this functionality is to activate Windows Server 2019 to avoid disruptions after deployment.
Activation via the command line and Software License Manager
Tapping into the elevated command line is a reliable way to access the Software License Manager (SLMGR), also called the Windows Software Licensing Management Tool. Interacting directly with SLMGR handles activation and access to license information.
There are some potential issues that come with working via the command line. Accidental commands will typically generate an error message, but it's possible to harm the environment. Certain SLMGR parameters can also alter registry information. Double-check the command before execution to avoid problems.
This SLMGR uses parameters to deliver specific instructions. The parameters act like extensions and use the following format: slmgr /[parameter].
The SLMGR parameters fetch licensing information, alter licensing information and execute activation for Windows Server 2019.
Here are some common SLMGR parameters:
- /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: removes license key information from the registry;
- /ipk [XXXXX-XXXXX-XXXXX-XXXXX-XXXXX]: changes the 25-digit license key or tries to activate the license if the provided key does not currently; and
- /ato: forces immediate online activation, which is especially useful when KMS servers or Microsoft's VLSC online activation servers aren't reachable.
The primary extension used with activating Windows Server 2019 is /ipk, often used if there are issues using the VLSC.
Activate Windows Server 2019 with the command line
The following example command activates a license key. Navigate to the system32 folder from the command line, replace the X's with the 25-digit license key and press Enter to execute the command:
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
A pop-up dialog box will show if the operation failed or succeeded. Microsoft recommends a server restart after a successful activation attempt. After a reboot, Server Manager will show the activated server.
If a server is missing from Server Manager, there might be an activation error. Open the command line and enter the slmgr /ato command. A Windows Script Host pop-up will display an error message that explains why the Multiple Activation Key was invalid. Either use another activation key or contact Microsoft for support.
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 called the KMS host, on the network for activation. A KMS host can be a VM or physical machine. To activate a computer running Windows Server 2019, the KMS host must use one of the following OSes: Windows Server 2012 R2, Windows Server 2016 or Windows Server 2019.
How to find and use the KMS Host license key
To set up a KMS host requires obtaining the KMS Host key. Use the following steps to activate the KMS host:
- From the VLSC website, navigate to License > Relationship Summary > Click Current Active License ID > Product Keys and copy the Windows Srv 2019 DataCtr/Std KMSfrom the keys list.
- Open the 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 either from Server Manager or via this PowerShell command:
Install-WindowsFeature -Name VolumeActivation -IncludeManagementTools
The KMS host should then announce its presence on the network for 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 the KMS host.