How to Activate Windows Server (2019, 2022 and 2025)
A Windows Server key activates the same way a desktop Windows key does — but Server has one extra step that catches most people, and it is worth checking before you type the key in at all.
In short
- Check the edition first: DISM /online /Get-CurrentEdition in an admin prompt. An answer ending in Eval is why keys get refused.
- Evaluation installation: convert it with DISM /online /Set-Edition:ServerStandard /ProductKey:XXXXX-… /AcceptEula, then restart.
- Normal installation: Settings → System → Activation → Change product key, or slmgr /ipk followed by slmgr /ato. If the key is refused, you can use the Microsoft Activation Portal instead.
Before you start: which edition is actually installed?
A Server key is tied to one edition. A Standard key will not activate a Datacenter installation, and a Datacenter key will not activate Standard. It is also tied to the version: a 2022 key will not activate 2019 or 2025.
Open an administrator command prompt and run:
- DISM /online /Get-CurrentEdition
It prints something like ServerStandard or ServerDatacenter. Compare it with what you bought.
If the answer ends in Eval — for example ServerStandardEval — your key will be refused no matter how many times you try. That is an evaluation installation, and it has to be converted first. This is the single most common reason a valid Server key appears not to work.
Converting an evaluation installation
The media Microsoft publishes for free installs the evaluation edition. Converting it to the full edition is one command, and it uses your key:
- Open an administrator command prompt.
- For Standard: DISM /online /Set-Edition:ServerStandard /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula
- For Datacenter: the same command with ServerDatacenter.
- Let it finish and restart when it asks.
The server activates during the conversion, so once it comes back up there is usually nothing else to do. Check with slmgr /xpr.
Activating a normal installation
If the edition is already the full one, activate it like any Windows machine:
- Open Settings → System → Activation, expand Change product key, enter the key and confirm.
- Or from an administrator command prompt: slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX followed by slmgr /ato.
A server with no desktop
Server Core installations have no Settings app. Everything is done from the command line, and both routes work:
- Run sconfig and choose the Windows Activation option from the menu.
- Or use slmgr /ipk and slmgr /ato directly, exactly as above.
Where to get the installation media
Microsoft publishes the ISO for each version on its Evaluation Center. It installs the evaluation edition, which you then convert with the command above:
If the key is still refused
- Check the edition again. Standard against Datacenter is the usual mismatch, and the error message does not say so.
- Check the version. A 2019 key on a 2022 installation is rejected immediately.
- An error code appeared. Look it up in our guide to Windows activation error codes.
- The product is marked Phone Activation. Online activation will never complete for those — see our phone activation guide.
Still stuck? Send us your order number and the exact error through our support form, and tell us what DISM /online /Get-CurrentEdition printed — that one line usually explains it.
Last checked: September 2026