Install Windows Server and activate it with a product key
- Windows Server 2025
- 2022
- 2019
- 2016
- Standard and Datacenter
Microsoft’s free download installs an evaluation edition. To use your Standard or Datacenter key, you convert the evaluation to the full edition with one DISM command. No reinstall is needed.
Download the ISO
Pick the version your key is for. Keys are not interchangeable between versions.
Windows Server 2025Microsoft Evaluation Centermicrosoft.com ↗ Windows Server 2022Microsoft Evaluation Centermicrosoft.com ↗ Windows Server 2019Microsoft Evaluation Centermicrosoft.com ↗ Windows Server 2016Microsoft Evaluation Centermicrosoft.com ↗Install
- Write the ISO to a USB drive or mount it in your virtual machine, then boot from it.
- When asked for the edition, choose Standard (Desktop Experience) or Datacenter (Desktop Experience) to match your key. Without “Desktop Experience” you get Server Core, which has no desktop.
- Choose Custom, pick the disk and finish setup. Set the Administrator password when asked.
Convert the evaluation and activate
- Open Command Prompt or PowerShell as administrator and check the current edition: If it ends in Eval (for example ServerStandardEval), continue. If not, skip to the next section.
DISM /online /Get-CurrentEdition - List the editions you can convert to:
DISM /online /Get-TargetEditions - Convert and enter your key in one step. Use ServerStandard or ServerDatacenter to match your key:
DISM /online /Set-Edition:ServerStandard /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEulaDISM /online /Set-Edition:ServerDatacenter /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula - Type Y when asked to restart. The server may restart twice.
- After the restart, activate online and check the result:
slmgr /atoslmgr /xpr
Already on a full (non-evaluation) edition
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXXslmgr /atoIf it fails
| Message | What to do |
|---|---|
| 0xC004F050 or “key not valid” on Set-Edition | The key is for another version or edition. A 2022 key does not work on 2025, and a Datacenter key does not work with ServerStandard. |
| 0xC004F074 after converting | The server still has a KMS setup key. Run slmgr /ipk with your key, then slmgr /ato. |
| 0xC004C008 | The key has been used too many times. Ask your seller for a replacement. |
| Set-Edition seems stuck | Wait. The progress bar can pause for several minutes. Do not restart until DISM asks you to. |
See also all activation error codes.
Key still not working?
Contact the seller you bought the key from. Reply to your order message with the error code or a screenshot: they can check the key and replace it if needed. We don’t sell keys and can’t check or replace them.