How to Activate Windows Server VPS for Free via KMS (step-by-step)

Learn how to activate Windows Server for free on your VPS using KMS: converting the evaluation edition with DISM, full slmgr commands, error troubleshooting, and final verification.

Hostini Windows Server VPSs ship with the evaluation edition of the system, which is valid for 180 days. As that period nears its end, Windows starts displaying activation warnings and eventually disables features, including Remote Desktop in some scenarios. To avoid this degradation, the evaluation edition has to be converted to the full edition and the license activated.

This tutorial covers the conversion and the activation via KMS (Key Management Service), the standard method for Windows Server Standard and Datacenter in environments that use volume licensing. We will check the installed edition, convert the evaluation to the full edition with DISM, configure the KMS server with slmgr, run the activation, and verify the result. We also cover handling of the most common errors (0xC004F074, 0xC004F069, 0x8007007B).

Estimated time: 20 to 30 minutes, including the edition conversion and the VPS restart, assuming you already have RDP enabled and a stable connection.

Prerequisites

Before starting, confirm that you have administrator access to the VPS and outbound network connectivity on port 1688.

Prerequisites

Windows Server 2019, 2022, or 2025 VPS in the Standard or Datacenter edition (evaluation or full), RDP access with a local administrator account, outbound TCP/1688 allowed by the firewall, Command Prompt opened as administrator (“Run as administrator”), and a time window in which the VPS can restart.

KMS port TCP 1688
Activation validity 180 days
Automatic renewal Every 7 days
Required privilege Local administrator
About legitimate licensing

KMS is official Microsoft technology for corporate volume activation. Third-party public KMS servers exist but operate in a legal grey area. For critical production environments, acquire a legitimate volume key or use Retail/MAK licenses. This guide is educational — the responsibility for usage is yours.

Identify your Windows Server edition

Before picking a key, you need to know which version and which edition is running, and whether it is an evaluation. The GVLK (Generic Volume License Key) varies by version and edition, and an evaluation installation only accepts the key after it has been converted to the full edition.

01

Open Server Manager (it opens by itself when you sign in to the VPS; if you closed it, search for “Server Manager” in the Start menu) and click “Local Server” in the left menu. Look at the “Operating system version” field.

On a Hostini VPS it shows something like “Microsoft Windows Server 2019 Datacenter Evaluation”. Note the version (2019, 2022, or 2025) and the edition (Standard or Datacenter). The trailing “Evaluation” marks the evaluation edition: in that case, the conversion described further down is mandatory. If the field does not end in “Evaluation”, the edition is already full and you skip the conversion section.

Pick the GVLK for your edition

Microsoft publishes the GVLKs on its official documentation site. They only work when paired with a real KMS server, but they are public and can be used freely as an intermediate step of the process. The key is chosen by version and target edition, and the same key is used for the conversion and for the activation.

Table of the most common keys:

EditionGVLK
Windows Server 2022 StandardVDYBN-27WPP-V4HQT-9VMD4-VMK7H
Windows Server 2022 DatacenterWX4NM-KYWYW-QJJR4-XV3QB-6VM33
Windows Server 2019 StandardN69G4-B89J2-4G8F4-WWYCC-J464C
Windows Server 2019 DatacenterWMDGN-G9PQG-XVVXX-R3X43-63DFG
Windows Server 2025 StandardTVRH6-WHNXV-R9WG3-9XRFY-MY832
Windows Server 2025 DatacenterD764K-2NDRG-47T6Q-P8T8W-YP6DF

Convert the evaluation edition to the full edition

An evaluation installation does not accept the GVLK through slmgr /ipk. The edition has to be converted first with DISM, which changes the edition and installs the key in the same command. There is no path through the interface: the commands run in Command Prompt opened as administrator. If your edition is already full (step 01), skip to the next section.

Before converting

The conversion restarts the VPS, sometimes more than once, and it stays offline in the meantime: pick a time when that is not a problem. Create a snapshot of the VPS in the panel before starting, so you have a way back if something goes wrong. The target edition must be one your evaluation allows: the Datacenter evaluation only converts to Datacenter, and the Standard evaluation converts to Standard or Datacenter. A server that is an Active Directory domain controller cannot be converted. Converting the edition does not replace the license: you need a valid license for the target edition.

02

Open Command Prompt as administrator: in the Start menu, type cmd, right-click “Command Prompt” and choose “Run as administrator”. Check the current edition:

DISM /online /Get-CurrentEdition

The “Current Edition” line carries the abbreviated edition name. On an evaluation the name ends in Eval: ServerDatacenterEval or ServerStandardEval. Keep Command Prompt open for the next steps.

03

List the editions your installation can be converted to:

DISM /online /Get-TargetEditions

Each “Target Edition” line carries a possible target, such as ServerDatacenter or ServerStandard. Note the exact name of the edition you are going to use. You can only convert to an edition that appears in this list: if the one you wanted is not there, pick one of the listed editions and the matching key from the table.

04

Run the conversion, passing the target edition and the GVLK from the table. For Windows Server 2019 Datacenter, for example:

DISM /online /Set-Edition:ServerDatacenter /ProductKey:WMDGN-G9PQG-XVVXX-R3X43-63DFG /AcceptEula

Replace ServerDatacenter with the edition noted in step 03, and the key with the table row that matches your version and that edition. /AcceptEula accepts the Windows Server license terms, which the command requires. To read the terms first, run the same command with /GetEula:C:\license.rtf in place of /ProductKey and /AcceptEula, then open the generated file.

The conversion takes a few minutes and the progress bar can sit still for a while: do not close the window. At the end, DISM says Windows needs to restart and asks whether it can do that now: answer Y. If it does not ask, restart from the Start menu.

05

The RDP connection drops during the restart, and the VPS may restart more than once. Wait a few minutes, reconnect and open Server Manager → “Local Server”.

The “Operating system version” field should no longer end in “Evaluation”: it now shows something like “Microsoft Windows Server 2019 Datacenter”. If “Evaluation” is still there, the conversion did not complete: repeat step 04 and read the message DISM shows.

Check the installed key

DISM already installs the key passed in the conversion. Before configuring the KMS server, confirm that the installed key is the GVLK for your edition.

06

In Command Prompt opened as administrator (Start menu, type cmd, right-click “Command Prompt” → “Run as administrator”), run:

slmgr /dlv

slmgr does not print to the terminal: after a few seconds, the result appears in a Windows Script Host window with detailed information about the current license. Check three fields: “Name”, which carries the edition (something like “Windows(R), ServerDatacenter edition”); “Description”, which should end in “VOLUME_KMSCLIENT channel”; and “Partial Product Key”, with the last five characters of the installed key, which must match the key in the table. Close the window with “OK”. If all three match, the key is already installed: skip step 07.

07

Only run this step if, in step 06, the “Description” field did not show “VOLUME_KMSCLIENT channel” or the “Partial Product Key” did not match the table. That is the case of a VPS that was already on the full edition with another type of key. Apply the key matching your edition. For Windows Server 2022 Standard, for example:

slmgr /ipk VDYBN-27WPP-V4HQT-9VMD4-VMK7H

Wait for the confirmation window: “Installed product key VDYBN-27WPP-V4HQT-9VMD4-VMK7H successfully.” If you get error 0xC004F069, the key does not match the installed edition: review the table. If the “Name” field from step 06 still carries “Eval”, the edition was not converted: go back to step 04.

Do not use OEM or Retail keys here

OEM keys (the ones printed on physical servers) and Retail keys (boxed copies) do NOT work with KMS. Installing a Retail key and then running slmgr /ato against KMS results in error 0xC004F015. Use only the GVLKs from the official table.

Configure the target KMS server

By default, the KMS client looks for the server via DNS (SRV records _vlmcs._tcp). If your VPS is not on a corporate network with an internal KMS, you need to point it manually to a server.

08

Configure the KMS endpoint. Replace kms.example.com with the server you intend to use (your company’s internal KMS, a licensed corporate service, etc.):

slmgr /skms kms.example.com:1688

The :1688 port is the default, and you can omit it if you are using that value. The confirmation window shows “Key Management Service machine name set to kms.example.com:1688 successfully.”

09

Verify that the configuration was saved. Run the detailed report again:

slmgr /dlv

In the window, look for the line “Registered KMS machine name: kms.example.com:1688”. If it is missing, the configuration was not applied: repeat step 08 in a Command Prompt opened as administrator.

Test connectivity before activating

Run Test-NetConnection kms.example.com -Port 1688 in PowerShell before slmgr /ato. If TcpTestSucceeded returns False, the problem is firewall or DNS. Fix it before proceeding, otherwise you will only collect 0xC004F074 errors.

Run the activation

With the key installed and the server configured, trigger the activation itself. The process is synchronous and takes between 5 and 30 seconds.

10

Start the online activation:

slmgr /ato

If everything is correct, the window shows “Product activated successfully.” If activation fails, the window carries the error code: see the troubleshooting section.

11

Confirm the activation expiration date:

slmgr /xpr

The window should show either “The machine is permanently activated.” (Retail/MAK key) or “Volume activation will expire” followed by a date and time, which is the KMS case. The date sits roughly 180 days in the future.

Full state verification

Before considering the task complete, it is worth reviewing the full license state to catch silent inconsistencies.

12

Run the detailed report:

slmgr /dlv

Check these fields in the window that opens:

  • “License Status”: should read “Licensed”
  • “Volume activation expiration”: roughly 180 days (the value is shown in minutes and in days)
  • “Registered KMS machine name”: the server you configured in step 08
  • “KMS machine extended PID”: must be populated, a sign that the KMS server answered

Troubleshooting

Three errors come up frequently. Here are the practical diagnostics.

Error 0xC004F074: KMS unreachable

This means the client tried to contact the KMS server and failed. Start by testing connectivity in PowerShell:

Test-NetConnection kms.example.com -Port 1688

If TcpTestSucceeded returns False, the problem is network. Allow outbound TCP/1688 on the VPS firewall and on any provider security group.

If the connection goes through, restart the Software Protection service. Press Win + R, type services.msc and hit Enter. Find “Software Protection”, right-click it and choose “Restart”. If the service is stopped, the available option is “Start” (that is normal: it shuts itself down when idle). Then try the activation again in Command Prompt:

slmgr /ato

Error 0xC004F069: incompatible key

The GVLK does not match the installed edition. There are two cases.

Evaluation edition: while the installation is an evaluation, slmgr /ipk rejects every key in the table, even the right one, and this is the code that usually shows up. Check the “Operating system version” field in Server Manager → “Local Server” (step 01). If it ends in “Evaluation”, run the conversion in steps 02 to 05 before installing the key.

Full edition: the key belongs to another version or another edition. Check the version and the edition in the same field and review the key table.

Error 0x8007007B: DNS does not resolve

The configured KMS server name is not being resolved by the local DNS. Test resolution in Command Prompt:

nslookup kms.example.com

If the answer shows “Non-existent domain” or “DNS request timed out” instead of the KMS server address, configure a public DNS temporarily. Press Win + R, type ncpa.cpl and hit Enter. Right-click the network adapter (usually “Ethernet”) and choose “Properties”. Select “Internet Protocol Version 4 (TCP/IPv4)” and click “Properties”. Select “Use the following DNS server addresses”, fill “Preferred DNS server” with 1.1.1.1 and “Alternate DNS server” with 8.8.8.8, and confirm with “OK”. Leave the IP address fields untouched.

After fixing DNS, run slmgr /ato again.

Next steps

With the license activated, the server stays stable for the next 180 days and will renew automatically. From here, you can move on to:

  • Harden RDP: change the default 3389 port, configure Network Level Authentication, and limit source IPs via Windows Defender Firewall.
  • Configure controlled Windows Update: enable automatic security updates but defer feature updates, avoiding unplanned reboots.
  • Monitor expiration: create a scheduled task that runs slmgr /xpr weekly and triggers an alert when fewer than 30 days remain.
  • Back up the activation state: document the GVLK and the KMS endpoint in a vault for quick recovery in case of reinstallation.

If you are putting this VPS into production and need honest infrastructure with a real SLA, KVM virtualization, and built-in DDoS protection, Hostini VPS delivers all of that across Brazilian datacenters — with no fine print on Windows licensing.

Frequently asked questions

Is KMS activation legal?

KMS (Key Management Service) is an official Microsoft mechanism for volume activation in corporate environments. It is legal when you own a valid license or are within a technical evaluation period. Third-party public KMS servers exist in a legal grey area — for production, acquire a legitimate volume key or use an OEM/Retail license.

How long does KMS activation last?

KMS activation is valid for 180 days and renews automatically every 7 days as long as the machine can reach the KMS server. If the server becomes unreachable for more than 180 days, Windows reverts to the notification state until it reconnects.

Can I activate Windows Server Datacenter with a Standard key?

No. Each version and edition has its own specific GVLK (Generic Volume License Key). Using the wrong key triggers error 0xC004F069. Check the version and the edition in Server Manager, under "Local Server", before picking the key.

Do I need to open any firewall port to activate?

Yes. Communication with the KMS server uses TCP 1688 by default. If your VPS has a restrictive firewall (Windows Defender Firewall or a cloud security group), allow outbound traffic on that port before running `slmgr /ato`.

What should I do when error 0xC004F074 appears?

This error means the client could not contact any KMS server. Check connectivity (`Test-NetConnection server -Port 1688`) and DNS resolution, restart the Software Protection service in `services.msc` and try again.

Will activation show as permanent afterwards?

No. KMS is always a renewable temporary activation. To see the real status, run `slmgr /xpr` — it will display the current expiration date. For permanent activation, you need a Retail or MAK (Multiple Activation Key).

Subjects: VPS and Windows Server

Next step

Ryzen cloud with NVMe storage and always-on DDoS protection.

Go live on a Hostini VPS
Did this tutorial help?

Still have a question?

Talk to the team: a real person replies, during business hours.

Talk to the team
Chat on WhatsApp