Skip to content

How to activate Windows Server

Activate Windows Server 2025, 2022, 2019 or 2016 from Settings or the command line, and convert an evaluation installation to the full edition.

Last checked

These steps are for Windows Server 2025, 2022, 2019 and 2016, Standard and Datacenter. In the commands, replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with your own key.

Before you start

  • Have your licence key ready. It is in your delivery email and on your order page.
  • The key must match the version and the edition that are installed. A Standard key is for Standard, a Datacenter key for Datacenter, and a 2022 key does not activate 2025.
  • Sign in as an administrator.
  • The server needs to reach the internet to activate online.

Not sure what is installed? Open PowerShell or Command Prompt as administrator and run:

DISM /online /Get-CurrentEdition

ServerStandard or ServerDatacenter is a full edition: go to Activate a full edition. If the name ends in Eval, the server was installed from Microsoft's evaluation download: go to Convert an evaluation installation.

Activate a full edition

From Settings (Server with Desktop Experience)

  1. Open Settings.
  2. On Windows Server 2025, choose System, then Activation. On Windows Server 2022, 2019 and 2016, choose Update & Security, then Activation.
  3. Choose Change product key, enter the key, and choose Next, then Activate.

From the command line (Server Core, or if you prefer)

Run these two commands as administrator, one after the other. Each one answers with a message when it has finished.

slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr.vbs /ato

The first installs the key. The second activates it with Microsoft.

Convert an evaluation installation

An evaluation installation cannot be activated as it is. It has to be converted to the full edition with your key, which takes one command and a restart. Nothing is reinstalled and your roles and data stay in place.

  1. Check which editions the server can be converted to:
DISM /online /Get-TargetEditions
  1. Convert it. For Standard:
DISM /online /Set-Edition:ServerStandard /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula

For Datacenter, use ServerDatacenter in place of ServerStandard.

  1. Restart when asked. The server may restart twice.
  2. After the restart, check activation as described below. If it is not yet activated, run slmgr.vbs /ato.

Two things to know:

  • A server that is an Active Directory domain controller cannot be converted. Add another domain controller, remove the role from this server, convert it, then add the role back.
  • Back up the server first, as you would before any change of this kind.

Changing Standard to Datacenter

A Standard installation can be changed to Datacenter with a Datacenter key, using the same command as above with ServerDatacenter. It cannot be changed from Datacenter back to Standard.

Check that it worked

Run:

slmgr.vbs /xpr

It should say the machine is permanently activated. For full details, including the edition, run slmgr.vbs /dlv.

If the server has no internet connection

Activation can be done with Microsoft by phone. On Server with Desktop Experience, run slui 4, choose your country, and follow the instructions. On Server Core, slmgr.vbs /dti shows the installation ID to read out, and slmgr.vbs /atp followed by the confirmation ID you are given completes the activation.

If it does not activate

  • 0xC004F050 means the key was not accepted as typed, or it is for a different edition or version from the one installed. Check with DISM /online /Get-CurrentEdition.
  • 0xC004C008 means Microsoft's server reports the key has reached its limit of activations.
  • 0xC004C003 means Microsoft's server reports the key as blocked.

For the first one, try once more after checking. For the other two, do not keep trying: email us with your order number, the error code, and the output of slmgr.vbs /dlv.

See also If your key does not activate. If the key is faulty, you choose a replacement or a refund.

Need a key?

Prices in Australian dollars, including GST. Keys are delivered by email.