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.