This article explains how to resolve error 0xC00F038 (The count reported by your Key Management Service (KMS) is insufficient). This error might appear when you use a self-hosted KMS host to activate Windows. The article reviews the common causes of this issue, and provides steps to resolve them. The troubleshooting steps in this article apply to physical computers, on-premises virtual machines (VMs), and Azure VMs.
Symptoms
When you try to activate a Windows system, you see the following error message in Windows Script Host:
The Software Protection Service reported that the computer couldn't be activated. The count reported by your Key Management Service (KMS) is insufficient. Please contact your system administrator.
Cause
Typically, this message indicates that the KMS host doesn't have enough computers in its KMS pool.
When you use a self-hosted KMS host (either on-premises or in Azure), you have to have a sufficient number of computers in the KMS pool before you can use the KMS host for activation. The following conditions apply:
- For Windows Server-based computers (including virtual machines (VMs)), the KMS count must be greater than or equal to five.
- For Windows Client-based computers (including VMs), the KMS count must be greater than or equal to 25.
Note:
Azure VMs that use the default Azure KMS endpoints (azkms.core.windows.net) typically don't encounter this error because the Azure KMS service handles activation counts automatically.
Resolution
To troubleshoot and fix the issue, follow these steps. To get the best results from these procedures, you should be familiar with the slmgr script.
Step 1: Add computers to the KMS pool
-
To obtain the current count on the KMS host, run
Slmgr.vbs /dliin an administrative Command Prompt window on the KMS host computer. -
Add unique KMS client computers until the count reaches the appropriate threshold.
-
To try again to activate, run the following command in an administrative Command Prompt window on the KMS client:
cscript c:\windows\system32\slmgr.vbs /ato -
If the activation fails, take one of the following actions:
- If the affected computer is an Azure VM, go to step 2.
- Contact Microsoft Support for assistance.
Step 2 (Azure VMs): Activate by using Azure KMS
By default, Azure VMs should use Azure Key Management Service (KMS) activation. If you don't have to use a self-hosted KMS host, reconfigure Azure VMs to use Azure KMS.
-
Open an administrative Command Prompt window on the Azure VM.
-
Set the appropriate KMS client setup key for your Windows version. For example, for Windows Server 2022 Datacenter, run the following command:
cscript c:\windows\system32\slmgr.vbs /ipk WX4NM-KYWYW-QJJR4-XV3QB-6VM33 -
To configure the Azure VM to use Azure KMS, run the following command:
cscript c:\windows\system32\slmgr.vbs /skms azkms.core.windows.net:1688 -
To try again to activate, run the following command:
cscript c:\windows\system32\slmgr.vbs /ato
If activation fails and generates the same error, contact Microsoft Support for assistance.
References
- Troubleshoot Windows activation error codes
- Troubleshoot Azure Windows virtual machine activation problems
- Troubleshooting tools for Windows activation issues on Azure VMs
Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
