During activation, Microsoft checks your product key. Whether the server is fully licensed also depends on the licence terms, such as core licences and CALs. This guide covers every way to activate Windows Server 2016, 2019, 2022 and 2025 with the key from your order: online, by telephone and from an evaluation installation. To install Windows Server first, start with Install Windows Server.
Your key
Your order contains the 25-character product key only, not an installer. The key is in your order confirmation email and in your Lizensa account under My Library. Installation media comes from Microsoft's Evaluation Center, as the installation guide explains. In this guide it appears as XXXXX-XXXXX-XXXXX-XXXXX-XXXXX. Copy it from the library rather than typing it. That avoids mixing up similar characters such as 8 and B.
A key matches one version and one edition. A Windows Server 2022 Standard key activates Windows Server 2022 Standard, not 2019 and not Datacenter. Essentials 2022 is the exception: its key activates an installation of Windows Server 2022 Standard, as Microsoft describes.
The licence decides how many instances you may run, not the key. According to Microsoft, a fully licensed Standard server may run two virtual instances of Windows Server, and Datacenter any number. Both need a Windows Server CAL for every user or device that uses the server. These CALs are licences only; you do not enter or activate them. Remote Desktop Services needs RDS CALs in addition, which you install through RD Licensing Manager on an activated RD licence server. Both are covered in Set up Windows Server CALs and RD Licensing. Essentials is limited to 25 users and 50 devices and does not require Windows Server CALs.
This guide covers these products, among others: Windows Server 2019 Standard, Windows Server 2019 Datacenter, Windows Server 2016 Standard, Windows Server 2022 Essentials and Windows Server 2016 Essentials.
Which installation do you have?
The commands differ depending on how the server was installed. Find out first. Open Command Prompt as administrator: open Start and search for Command Prompt, right-click the result and choose Run as administrator. Then run:
DISM /online /Get-CurrentEdition
- The edition name contains
Eval, for exampleServerDatacenterEval. You have an evaluation from Microsoft's Evaluation Center. Use the DISM conversion below. - The edition name has no
Eval, for exampleServerStandard. You have a full installation. Useslmgr. - You run Essentials 2016 or 2019 from Essentials media. Use
slmgras well.
As a second check, run the following command. For an evaluation, the description contains the word EVAL.
slmgr /dlv
Make sure the installed edition matches your key before you continue. If it does not, correct the installation first; activation cannot change Standard into Essentials or Datacenter into Standard.
Before you activate
Activation works only on a finished installation. Check these points:
- Setup has completed and you can sign in as an administrator.
- The server has the correct date, time and time zone. A wrong clock can make online activation fail.
- For online activation, the server reaches the internet. Proxy servers and firewalls must allow connections to Microsoft's activation services over HTTP and HTTPS.
- The latest updates from Windows Update are installed. Microsoft asks for this after every new installation from the Evaluation Center.
- On a domain controller that runs an evaluation, stop here. Microsoft does not allow converting an evaluation domain controller. The installation guide explains the way around it.
If Windows Server is not installed yet, here is the short version. Download the evaluation media for your version from Microsoft's Evaluation Center: the shared ISO for Standard, Datacenter and Essentials 2022, or the Essentials media for Essentials 2016 and 2019. Start the server from it, choose the matching image and installation option, and finish setup. Server Core and Desktop Experience can only be swapped later by reinstalling. All steps with links are in the installation guide.
Activate Windows Server
All commands below run in Command Prompt as administrator. On Server Core, a command window or the SConfig menu opens after sign-in. In SConfig, choose the option to exit to the command line. If that opens PowerShell, switch to Command Prompt with this command:
cmd
Full installation and Essentials 2016/2019: slmgr
- Install your key. Any key already on the system is replaced:
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
A Windows Script Host window confirms that the key was installed. Select OK.
- Activate online:
slmgr /ato
After a few seconds the window reports that the product was activated successfully. Select OK.
Microsoft recommends restarting the server, or at least the Software Protection service, after you install a key. Do this before step 2 if you can.
If you prefer the result as text in the command window, for example in a remote session or a script, run the script through cscript. The output then appears in the window instead of a pop-up:
cscript %windir%\system32\slmgr.vbs /ato
Microsoft documents slmgr /ipk as the way to turn Essentials into the full version and to move between retail, volume and OEM licences of the same edition. It does not change the edition itself.
Server installed from volume licence media
Some servers were installed from company media and carry a generic volume key. They try to reach a company activation server (KMS) and report errors such as 0x8007232B. Microsoft lets you switch such a server to your key at any time, as long as the edition stays the same. Run the two slmgr commands above. Your key replaces the generic one, and the server activates directly with Microsoft from then on.
Evaluation installation: DISM
A Standard or Datacenter evaluation is converted with DISM, not with slmgr. The conversion installs your key and turns the evaluation into the full edition. After the restart, check the activation and activate online or by telephone if needed. Essentials 2016 and 2019 use the slmgr commands above instead.
- List the possible target editions:
DISM /online /Get-TargetEditions
-
Continue only if your target edition appears in that list. For Essentials 2022, the target is
ServerStandard. A Datacenter evaluation converts only to Datacenter. A Standard evaluation installed as Server Core converts only to Datacenter, not to Standard. Desktop Experience and Server Core cannot be swapped during the conversion. If your target is missing, you need a new installation; see the installation guide. -
Convert to the edition on your order. For Standard and Essentials 2022:
DISM /online /Set-Edition:ServerStandard /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula
For Datacenter:
DISM /online /Set-Edition:ServerDatacenter /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula
- Confirm the restart with
Ywhen DISM asks. If the server is not activated after the restart, run the activation command as above:
slmgr /ato
The DISM command with /Set-Edition:ServerDatacenter also upgrades a full Standard installation to Datacenter at any time, if your key is a Datacenter key. Microsoft documents this conversion from Standard to Datacenter only. To go from Datacenter back to Standard, install Windows Server again.
Activate a server from another computer
slmgr can also work on a remote server. That helps with Server Core machines you manage from a workstation. Add the server name, an administrator account and its password before the option:
slmgr SERVER01 Administrator <password> /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr SERVER01 Administrator <password> /ato
Replace SERVER01 with the name of your server. Remote use needs administrator rights on the target server and a network configuration that allows remote management. If it fails, run the commands locally on the server.
Activate by telephone
Use the telephone when the server has no internet access or online activation keeps failing. Install your key first, with slmgr /ipk or the DISM conversion. Both work offline. As long as the server still runs an evaluation, remember Microsoft's rule that it must be activated over the internet within its first 10 days, or it starts to shut down.
With Desktop Experience:
- Open the telephone activation window. Select Start, type the following and press Enter:
slui 4
- Select your country or region. The window shows a telephone number and your installation ID.
- Call the number. The automated service asks for the installation ID.
- Enter the confirmation ID you are given in the window and complete the dialog.
On Server Core, or if the window does not open:
- Show the installation ID:
slmgr /dti
- Write the ID down. Call Microsoft's activation centre for your country. The numbers are on Microsoft's list of activation centres.
- Give the installation ID. You receive a confirmation ID of 48 digits. Write it down carefully.
- Enter it without spaces or hyphens, in place of the placeholder:
slmgr /atp <confirmation-ID>
Check the activation
- Show the detailed licence information:
slmgr /dlv
The window shows your edition, the last five characters of the key and License Status: Licensed.
If the status reads Notification or shows a grace period instead, Windows Server is not permanently activated yet. Check the last five characters to confirm that the key from your order is installed. Try online activation again and note the error code it reports. The section below explains the common codes.
slmgr /ato
- Check the expiry:
slmgr /xpr
The message says the machine is permanently activated. Microsoft describes retail activation as permanent; there is no renewal.
A shorter summary also works without administrator rights. It is handy for a quick check by a colleague without admin access:
slmgr /dli
With Desktop Experience you can also open Settings. On Windows Server 2016 to 2022 go to Update & Security > Activation. On Windows Server 2025 go to System > Activation. The page says that Windows is activated.
Moving the licence to a new server
When you replace the hardware, remove the key from the old server before you retire it:
slmgr /upk
slmgr /cpky
The first command uninstalls the product key. After a restart, the old server is unlicensed. The second removes the key from the registry. Removing the key does not by itself give you the right to move the licence: Microsoft's licence terms decide that. For Standard and Datacenter, every physical core of the new server must also be licensed, with at least 8 per processor and 16 per server. Essentials has its own limits. If the move is allowed, install and activate the key on the new server as described above. If you are unsure, ask our support before you retire the old server.
If something goes wrong
0x80070005, access denied. Usually the command window lacks administrator rights. Close it and open it again with Run as administrator. See error 0x80070005.
0xC004F069 after slmgr /ipk. Check the installed edition with the DISM command from the start of this guide. If it is a Standard or Datacenter evaluation, use the DISM conversion instead. If it is a full installation, check that the key matches its version and edition.
0xC004F050, the key is invalid. The key belongs to another version or edition, or it contains a typo. Compare the version on your order with the installed one. Then copy the key again from your library. See error 0xC004F050.
0x8007232B or 0xC004F074 during activation. The server still carries a generic key for company activation servers (KMS) and tries to reach one. Run the two commands from the section on slmgr above with your own key. See error 0x8007232B and error 0xC004F074.
0xC004C003, the key is blocked. Microsoft's activation server refuses this key. Do not try other keys. Contact our support with your order number. Background: error 0xC004C003.
0xC004C008 or 0xC004C020, the key has reached its limit. Microsoft's activation server reports that the key has reached its activation limit. If the server's hardware has changed, try telephone activation. Otherwise contact our support with your order number. See error 0xC004C008 and error 0xC004C020.
0xC004F02C after slmgr /atp. The confirmation ID was entered incorrectly. Type it again, without spaces or hyphens.
0xC004C001, the activation server says the key is invalid. Microsoft's server does not recognise the key. Check it character by character against your library. If it is correct, contact our support.
0xC004F06C, the request timestamp is invalid. Check the server's date, time and time zone. Correct any wrong values, then try online activation again:
slmgr /ato
Online activation fails without a clear code. Check the date, time and internet access of the server, and whether a proxy blocks outgoing connections. Then use telephone activation.
Still stuck? Contact our support with your order number, your Windows Server version and the exact error code.
