By default, the Windows operating system is activated online at Microsoft activation servers on the Internet. For enterprise customers, Microsoft offers an alternative to online activation called the Key Management System (KMS).
KMS is a separate license server on which the Volume Activation Services role is installed and activated using the KMS host key. Such a KMS server allows all workstations and Windows servers in the organization to perform on-premises OS activation, without the need for clients to access Microsoft activation servers on the Internet.
This article looks at how to deploy a KMS server and use it to activate Windows client computers.
Table of Contents
KMS Activation FAQ
KMS activation server allows to activate volume editions of Windows OS and Microsoft Office products within the enterprise network. The KMS infrastructure is very simple: install the Volume Activation Services role on Windows Server, add your KMS Host Key (from Microsoft Volume Licensing Service Center), and activate your corporate KMS server on Microsoft by phone or online (this could be performed only once). After that, your enterprise devices can send activation requests to the KMS server and activate with it.
KMS is based on a client-server architecture. KMS client computers (your Windows workstations and Windows Server hosts) can find the KMS host in domain using DNS or you can manually set the KMS host address on the clients. By default, the KMS client connects to the KMS host on port TCP/1688.
The main advantages of KMS activation:
- KMS clients do not need to access the Internet or the phone to activate the product (only network access to the KMS server is required);
- The KMS client is activated on the internal KMS server for 180 days. It tries to renew the activation every 7 days;
- If the KMS client is unable to contact the KMS license server for 180 days, your Windows device will be given a grace period of 30 days. After the 30-day grace period expires, Windows will switch to “Reduced Functionality Mode” (RFM);
- In case the KMS server is damaged or lost, there is nothing to restore from the backup on the KMS server. Install a new Windows Server host, install the KMS role, enter the KMS host key, activate, and you are ready to go!!
- For domain-joined computers, you can use Active Directory Based Activation (ADBA) instead of KMS host;
- KMS infrastructure is simple and scalable. A single KMS server can serve thousands of clients.
Deploying KMS Volume Activation Role on Windows Server 2022/2019
You can install a KMS server on any version of Windows Server. In this example, we will show how to install a KMS activation server on Windows Server 2019.
Note. You can also deploy the KMS host on desktop versions of Windows such as Windows 11, 10, or 8.1. KMS host running on a desktop Windows edition cannot be used for KMS activation of Windows Server computers.
You can install the KMS role using the Server Manager GUI (Server Manager > Add Roles and Features > Roles > Volume Activation Services).
Or, you can install and configure the KMS server role using PowerShell:
- Run the PowerShell console as administrator and execute the following command:
Install-WindowsFeature -Name VolumeActivation -IncludeAllSubFeature –IncludeManagementTools
- If you have Windows Defender Firewall enabled on your computer, you will need to allow inbound connections on TCP port 1688. This can be done by the following PowerShell command:
Enable-NetFirewallRule -Name SPPSVC-In-TCP
- Go to the Microsoft Volume Licensing Service Center website > Downloads and Keys > Windows Server > Windows Server 2019 > Key, and copy your KMS Host Key (Windows Srv 2019 DataCtr/Std KMS). This key is called CSVLK.
- Now you can install your KMS host key on your server. Run the command:
slmgr /ipk <your_Windows_SRV_2019_KMS_host_key>
- In order to activate your KMS server online on Microsoft servers, run the command:
slmgr /ato
(you need to temporarily provide direct Internet for your server);
- To check the KMS server activation status, run:
slmgr /dlv
- If necessary, you can optionally install the Volume License Pack for your Office version in order to activate volume Office copies on the KMS server (described in tutorial Microsoft Office KMS activation);
- Now you can configure KMS clients to activate on your KMS server.
Hint. You can activate up to 6 KMS servers with the same KMS host key.
Please note that the KMS host key Windows Srv 2019 allows you to activate all previous versions of Windows, starting from Windows 7/Windows Server 2008 R2. However, if your KMS server is activated with an older host key, you won’t be able to activate new versions of Windows.
For example, if you activate your KMS server with the Windows Srv 2016 key, you won’ be able to activate Windows 11 or Windows Server 2019/2022. The maximum supported versions of Windows to activate in this case are Windows 10 and Windows Server 2016.
How to Activate Windows Computer with KMS License Server
Change the Windows Product Key to Public KMS Client Setup Key
Before activating your Windows client on the KMS server, you must change the product activation key to the public KMS Client Setup Key (GVLK, Generic Volume License Key. You can change the product key to KMS from the Windows GUI (use the command slui.exe 4), or you can use the slmgr command-line tool.
You can find the GVLK for your version of Windows here.
For example, according to this table, we should use the W269N-WFGWX-YVC9B-4J6C9-T83GX KMS Client Product Key for Windows 11 and 10 Professional edition.
Install the GVLK key you found on your Windows device:
slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
Wait until the confirmation message “Product key XXXXX installed successfully” appears.
Note. If your Windows computer was previously activated using the MAK key, this will change the product key from MAK to KMS (GVLK).
Now you can run the following command to activate your Windows copy on KMS server:
Slmgr.vbs /ato
And wait until the message Product activated successfully appears;
In this case, the Windows client used the SRV (_VLMCS) record in the Active Directory DNS to find the KMS server on a domain.
Tip. You can manually set the KMS server address on a client if this SRV record is missing, or if your computer is not connected to AD using the nslookup command:
nslookup -q=SRV _VLMCS._TCP.theitbros.com
This command lists all KMS registered.
You can manually set the KMS server address on a client if this SRV record is missing, or if your computer is not connected to AD.
Manually Activate Windows with KMS Server
You can manually specify the address of the KMS server using the slmgr with the /skms option. You can also set the TCP port number on which the activation service listens (by default 1688):
slmgr.vbs /skms <KMS_server_name_or_IP>:1688
Key Management Service machine name set to hostname successfully.
You can test network connectivity between your computer and the KMS server using the PowerShell command:
Test-NetConnection -ComputerName KMS_server_name_or_IP -Port 1688
Then you can activate your Windows client with the KMS server:
Slmgr.vbs /ato
Check the Status of Windows Activation
Optionally, you can display information about the Windows activation status:
slmgr.vbs /dli
As you can see, the utility returned the following useful info:
- Name — the OS version;
- Description — distribution channel VOLUME_KMSCLIENT channel;
- License status — licensed;
- Volume activation expirations — 180 days;
- KMS server IP address and DNS name (Registered KMS machine name).
If you want to check when the license period expires:
slmgr /xpr
You can use the slmgr.vbs tool to perform Windows KMS activation on the remote computer. The following command will check the activation status on the remote computer named nywsdx3323. The connection credentials are specified in plain text:
slmgr.vbs nywsdx3323 administrator P@ssw0rdd -dli
Windows KMS Activation Errors
Most often users face the following errors when activating Windows with the KMS server:
- 0xC004F074 (The software licensing service reported that the computer could not be activated. No Key Management Service (KMS) could be contacted) — the KMS server is not available. It means that the KMS service is not running on the target server or that access to it from the client is blocked by a firewall.
- 0xC004F038 (The Software Protection Service reported that the computer could not be activated. The count reported by your Key Management Service (KMS) is insufficient. Please contact your system administrator) — you did not have the necessary number of activation requests on the KMS server (called the activation threshold). For desktop Windows edition the minimum number of KMS clients – is 25, for Windows Server – 5 (it can be both physical devices and virtual machines). You can check the current count of hosts connected to the KMS server with the command slmgr.vbs /dli. Target more Windows hosts to your KMS server;
- 0xC004F015 (The Software Protection Service reported that the product key is not available) — you will see this error when you try to activate a newer version of Windows OS on the KMS server that is activated with the old KMS host key. In this case, you need to get a new KMS host key from VLSC and reactivate your KMS server.
- 0x80072F8F (We can’t activate Windows on this device at the moment. You can try activating later) — check if the time and date on your device are correct. If necessary, synchronize the time with the NTP server;
- 0xC004F035 and 0xC004F059 (The software licensing service reported that the computer could not be activated with a Volume license key. Volume-licensed systems require upgrading from a qualified operating system. Please contact your system administrator or use a different type of key) — these errors may occur on computers running OEM versions of Windows. There is a special ACPI_SLIC table in the BIOS of these computers. The KMS server can’t find a special token in such a table and cannot activate Windows. In such cases, it is recommended to update (flash) the BIOS firmware.
You can use the Slui.exe tool to display a description of most activation related error codes (use the syntax: slui.exe 0x2a ErrorCode). For example, to get a more detailed description of activation error 0xC004F074, use the following command:
slui.exe 0x2a 0xC004F074
The error description contains detailed information:
Windows Activation
Code:
0xC004F074
Description:
The Software Licensing Service reported that the product could not be activated. No Key Management Service (KMS) could be contacted. Please see the Application Event Log for additional information.
You can also find all activation-related events in the Event Viewer application log under the provider name Microsoft-Windows-Security-SPP.
6 comments
It turns out that i’m having error0xC004F074. Is there anyway to figure this out.
Hello,
What are the server minimum hardware requirements or recommendations to build a KMS server on Win Server 2019? One 2019 server is fine or a redundancy is recommended for 10,000 nodes?
Thanks
It makes a easily sellable product that can work off i net in a closed network. The time bomb approach was probably a feature requested by the most irresponsible people.. the government. Heck without a cac or a local net the device can be made useless.. we know publicly there was 700 just reported missing the other day..
Brian, this was probably the most usable and helpful article on KMS that I’ve found. All of it was helpful, but in particular, the KB update requirements for certain situations and the error code information. Thank you for spending the time to write this… and thanks for updating it recently.
Can the kms host be installed on windows for activating other windows 11 clients?
How do I install the kms host role/feature on windows 11 ?
thank you
Very helpful article.
One major detail missing, though.
What happens to the activated client PC at the end of the activation expiry period (eg. as above, 180 days) ?
Does the KMS Server renew its’ certificate or does it just “die in the dust” ?
Comments are closed.