Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / How to increase KMS current count (count is insufficient)

April 20, 2018 Windows 10Windows 7

How to increase KMS current count (count is insufficient)

On our blog we have already bring information about the installation, configuration and activation of Microsoft products (MS Office and Windows) using Key Management Service (KMS). Today we will take a look at the concept of KMS activation counter, consider how to count the number of client activations and ways to manually increase the KMS activation request count.

Contents:
  • Understanding KMS activation
  • Activation error 0xC004F038: The count reported by your KMS is insufficient
  • Script to Increase KMS Server Current Count
  • How to increase the activation count using VM snapshots

Understanding KMS activation

Let’s return first to the theoretical basics of the KMS volume activation. A large overview of the Microsoft KMS Licensing is described in details in the article KMS Activation FAQ.

Tip. It is also advisable to read the following articles on our site:

  • Installing KMS server on Windows Server 2012 R2 / 2016
  • KMS activation for MS Office 2016 / 2013

According to the Microsoft Volume License program, the minimal amount of licenses in one package is 25. Each Volume License customer gets a special CSVLK key (or KMS host key) which is used to activate an internal corporate KMS server. Internal clients (both Windows and MS Office) can be activated on this server with the help of KMS server, without having to contact Microsoft’s activation servers over the Internet.

Activation error 0xC004F038: The count reported by your KMS is insufficient

However, right after the installation and activation, the KMS server will not activate the clients that contacted it. If you try to activate your OS (Windows 7 Pro, in this example) on a new KMS, you receive an error:

Activating Windows 7, Professional edition

0xc004f038:  The Software Licensing 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. windows 7 kms activation error 0xc004f038 - insufficient KMS count

The matter is that the KMS server has a so-called activation count (kms counter) which value is incremented after each activation request is received from a network client. When accessed, the KMS server assigns a unique identifier CMID (client machine identification) to each client and puts it into local database (cache). In this case, the OS of the computer from which the request was received is not activated immediately. These activation requests are accumulated in the internal KMS cache on the server. This occurs until a certain minimum threshold of activation requests received within the last 30 days has been overcome in the KMS database. This threshold is 5 activation requests from the server OSs and 25 activation requests from the desktop Windows OSs (the activation thresholds for desktop/server OSs are independent, i. e. if the value of the KMS count has exceeded 25 activation requests from client OSs, this server will not activate server OSs until the number of activation requests from these platform reaches 5). If the client does not contact the KMS activation server during 30 days, it is automatically removed from the KMS database, and the KMS activation counter is reduced by one.

You can get the CMID value on a particular computer using the following command:

Get-WmiObject -class SoftwareLicensingService -ComputerName salarypc121 | Select-object ClientMachineID

get kms client cmid using powershell

You can reset the current CMID by running sysprep or using the command:

slmgr /rearm  (need a reboot).

At any time, the total number of activation requests received by the KMS server can be viewed using the command:

slmgr /dli

In this example, the KMS counter value (Current count) on the KMS server is 50.

Note. The KMS server caches only the last 50 CMIDs (in this case, the number of KMS clients on the server can be significantly more than 50).

get kms activation current count

To get the exact value of the counter, run the following command on the KMS server:

cscript slmgr.vbs /dlv 98ebfe73-2084-4c97-932c-c0cd1643bea7

Key Management Service cumulative requests received from clients
Total requests received: 2599

This means that this KMS server received 2599 activation requests from clients.

kms requests received

KMS client activation period is 180 days, and every 7 days (7 days is set by default, it can be changed with the command slmgr.vbs /sri) the client tries to renew the activation (for the next 180 days). If within 180 days the client did not renew the activation, the KMS server removes the client’s CMID from the database and reduces activation counter. The client’s OS still activated within 180 days. The client that hasn’t renewed its activation on the KMS server during 180 days, it goes into the grace period mode.

In case if you try to activate the client OS on the KMS server and the count doesn’t increase, it can be caused by the following reasons:

  1. Duplicating CMID (usually it takes place when cloning an OS);
  2. More than one KMS server in the network. By default, clients can automatically find the KMS server in the domain using a special DNS record – srv _vlmcs._tcp  (you can get the name of the server using command:  nslookup -type=srv _vlmcs._tcp). You can manually specify the KMS server name as follows: slmgr /skms kms_server.woshub.com:1688);
  3. Invalid key specified on the client. For example, instead of an public GVLK (Generic Volume License Key), MAK / retail key is specified, or a key not corresponding to the operating system.

Script to Increase KMS Server Current Count

In some cases even if a VLC has been purchased, it is difficult to find immediately necessary number of clients to overcome the activation threshold of the KMS server (the problem is particularly relevant for small or isolated networks). When the client is trying to activate on the server in this case, an error 0xC004F038 appears.

In this case an administrator starts thinking about manually increasing the KMS activation counter. However, it’s not so simple… Neither sysprep, nor a change of the MAC address for a network card help you to cheat the KMS server. As a quite popular variant, it is suggested to create the missing number of virtual machines and activate them on the KMS server (virtual machines have to be unique). However, this method is quite time consuming and requires keeping all these machines functional (or their re-deploying or turning on every180 days).

As an easier alternative, we recommend you to use the following cmd script that allows to increase the activations count on the KMS server. Install the necessary version of the OS (in this example, it is Windows 7 Professional), create a directory and copy the following BAT file into it. In the same folder create two empty files named:

7B296FB0-376B-497e-B012-9C450E1B7327-5P-0.C7483456-A289-439d-8115-601632D005A0
7B296FB0-376B-497e-B012-9C450E1B7327-5P-1.C7483456-A289-439d-8115-601632D005A0

Run increase_kms_count.bat:

@echo off
set skms=kms_server.woshub.com
for %%i in (. . . . . . . . . . . . . . . . . . . . . . . . . .) do call :Act %skms%
slmgr /ato
sc stop sppsvc
goto :end
:Act
sc stop sppsvc
xcopy "7B296FB0-376B-497e-B012-9C450E1B7327-5P-0.C7483456-A289-439d-8115-601632D005A0" "%systemroot%\system32\*" /H /R /K /Y
xcopy "7B296FB0-376B-497e-B012-9C450E1B7327-5P-1.C7483456-A289-439d-8115-601632D005A0" "%systemroot%\system32\*" /H /R /K /Y
sc start sppsvc
cscript.exe "%systemroot%\system32\slmgr.vbs" /skms %1
ping 127.0.0.1 -n 5 > nul
cscript.exe "%systemroot%\system32\slmgr.vbs" /ipk FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4
cscript.exe "%systemroot%\system32\slmgr.vbs" /ato
sc stop sppsvc
:end

The number of dots in the line 3 is the required number of requests to the KMS server (in this example, we simulate the access of 25 unique clients)

In the script, a 5 second delay is added; in some cases, the system returned that the files are busy, and the activation attempt was not counted.

Important. Do not run this script on the KMS server itself! Otherwise, you will need to reactivate the KMS server (only 6 attempts to activate one VLC key are allowed).

After the script is executed, check the KMS count:

slmgr /dli

The value of the Current count should increase by 25. After that the KMS server will activate all the desktop systems accessing it (whether Windows 7, 8 or Windows 10). Later this script (if there is not enough real clients) should be run every 30 days, since the activation count will reduce if there wouldn’t be activation requests to the server.

How to increase the activation count using VM snapshots

If the above script did not help you to increase the activation count on the KMS server, you can increase the counter value by using virtual machine snapshot technology in Hyper-V / VMWare. The algorithm is as follows:

  1. Create a new VM with Windows 10 (do not activate it and do not enter GVLK key, it’s best to temporarily disconnect it from the network);
  2. Create the following 2 scripts on the VM desktop, one of which resets the CMID and changes hostname. The second performs the OS activation.Rearm.bat
    start “cmd /c slmgr /rearm" timeout /t 15 /nobreak > NUL
    wmic computersystem where name="%COMPUTERNAME%" call rename name="vmpc-%random%"
    shutdown /r /t 0 kms_activate.bat

    set skms= kms_server.woshub.com
    sc start sppsvc
    script.exe "%systemroot%\system32\slmgr.vbs" /skms %1
    cscript.exe "%systemroot%\system32\slmgr.vbs" /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
    cscript.exe "%systemroot%\system32\slmgr.vbs" /ato
  3. Put the kms_activate.bat script into Windows startup;
  4. Create a snapshot of the virtual machine;
  5. Run the Rearm.bat script with administrator privilegies. The virtual machine will reboot and activate on the KMS server;
  6. Rollback the VM to the previous state;vmware vm snapshot
  7. Follow steps 5, 6 as many times as the number of activation requests you want to add on the KMS server.

40 comments
6
Facebook Twitter Google + Pinterest
previous post
Installing KMS Server on Windows Server 2012 R2
next post
Limited Wi-Fi Access in Windows 10 and 8.1 – Troubleshooting

Related Reading

Configuring Event Viewer Log Size on Windows

May 24, 2023

How to Detect Who Changed the File/Folder NTFS...

May 24, 2023

How to Create, Change, and Remove Local Users...

May 17, 2023

Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows

May 16, 2023

View Success and Failed Local Logon Attempts on...

May 2, 2023

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Configuring Event Viewer Log Size on Windows

    May 24, 2023
  • How to Detect Who Changed the File/Folder NTFS Permissions on Windows?

    May 24, 2023
  • Enable Single Sign-On (SSO) Authentication on RDS Windows Server

    May 23, 2023
  • Allow Non-admin Users RDP Access to Windows Server

    May 22, 2023
  • How to Create, Change, and Remove Local Users or Groups with PowerShell?

    May 17, 2023
  • Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows

    May 16, 2023
  • View Success and Failed Local Logon Attempts on Windows

    May 2, 2023
  • Fix: “Something Went Wrong” Error When Installing Teams

    May 2, 2023
  • Querying Windows Event Logs with PowerShell

    May 2, 2023
  • Configure Windows LAPS (Local Administrator Passwords Solution) in AD

    April 25, 2023

Follow us

  • Facebook
  • Twitter
  • RSS
Popular Posts
  • Booting Windows 7 / 10 from GPT Disk on BIOS (non-UEFI) systems
  • Error Code: 0x80070035 “The Network Path was not found” after Windows 10 Update
  • Removable USB Flash Drive as Local HDD in Windows 10 / 7
  • How to Disable UAC Prompt for Specific Applications in Windows 10?
  • Managing Printers and Drivers with PowerShell in Windows 10 / Server 2016
  • Managing Printers from the Command Prompt in Windows 10 / 8.1
  • Using the BitLocker Repair Tool to Recover Data on Encrypted Drive
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top