Share via


Why isn’t KMS counting activation requests?

Learn some techniques to avoid error 0xC004F038 when using KMS to activate Office installations.

Key Management Service (KMS) helps you activate multiple Office licenses over your local network, without requiring each computer to connect up to Microsoft for activation. Sometimes, though, KMS can appear to disregard client activation requests, causing the following error:

0xC004F038
The Software Licensing Service reported that the product could not be activated. The count reported by your Key Management Service (KMS) is insufficient. Please contact your system administrator.

This issue occurs because the KMS server has to receive at least five unique requests before it begins activating licenses. If you have used Sysprep in your environment, it’s possible Office was not rearmed prior to the image creation. This can create a situation where multiple computers are using the same Office Client Machine ID (CMID), which in turn will cause the KMS server to count them as one computer. To see if this is happening, check the Key Management Service Host log in Event Viewer on the KMS server. You will see entries like these:

0x0,5,Ignite1.ignite.local,930bd202-a335-4c7e-bd9d-7305361f0d37,2010/6/10 19:34,0,5,0,6f327760-8c5c-417c-9b61-836a98287e0c

0x0,5,Ignite2.ignite.local,2f362dd3-fb39-4d18-94e6-de1d30dd27d5,2010/6/10 19:33,0,5,0,6f327760-8c5c-417c-9b61-836a98287e0c

0x0,5,Ignite5.ignite.local,930bd202-a335-4c7e-bd9d-7305361f0d37,2010/6/10 19:32,0,5,0,6f327760-8c5c-417c-9b61-836a98287e0c

Notice Ignite1 and Ignite5 have the same CMID (930bd202-a335-4c7e-bd9d-7305361f0d37). This indicates that while the base OS image may have been generalized, the Office rearm step was skipped.

On most client computers, you can use the command ospp.vbs /dcmid to check the CMID. However, if you are running Office 2013 on a Windows 8 system, ospp.vbs /dcmid will return the CMID for Windows 8, not for Office 2013. You have to look in Event Viewer in the Application log to get the Office CMID. For more information see the related blog post.

Rearming Office prior to creating an image

This procedure ensures that the image you create will result in unique CMIDs when deployed.

  1. Make sure all Office 2013 applications are closed.

  2. Open an elevated command prompt.

  3. Go to %Program Files%\Microsoft Office\Office15. If you installed the 32-bit edition of Office 2013 on a 64-bit operating system, %Program Files% is the Program Files (x86) folder.

  4. At the command prompt, type ospprearm.exe. When it completes, you should see the message “Microsoft Office rearm successful.”

  5. Capture the image or save the virtual machine. For more information about how to capture the image, see Configure Office 2010 for a hard disk image.

    Important: Don’t open any Office applications or run ospp.vbs while the image is being captured. Otherwise, the grace period timer will start.

Fixing already-deployed clients

If you’ve already deployed your OS image to computers, but the Office rearm was not done during the imaging process, you can use this startup script on each computer to rearm Office and generate a new unique Office CMID. This works on both 32-bit and 64-bit versions of Office 2013.

 @echo off
 
:OSPP 
reg query HKLM\Software\Microsoft\Office\15.0\Common\OSPPREARM 
if %errorlevel%==1 (goto RUN) else (goto END)
 
:RUN 
set ProgramFilesPath=%ProgramFiles% 
"%ProgramFilesPath%\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.EXE" 
C:\Windows\system32\cscript.exe "%ProgramFilesPath%\Microsoft Office\Office15\ospp.vbs" /act 
set ProgramFilesPath=%ProgramFiles(x86)% 
"%ProgramFilesPath%\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.EXE" 
C:\Windows\system32\cscript.exe "%ProgramFilesPath%\Microsoft Office\Office15\ospp.vbs" /act 
REG ADD "HKLM\Software\Microsoft\Office\15.0\Common\OSPPREARM"
 
:END 
Exit

Comments

  • Anonymous
    January 01, 2003
    It is a great post, Chris. Excellent solution.

  • Anonymous
    August 15, 2013
    Chris, I am trying to run this as a start-up script butit does not change the Office CMID. I would appreciate any guidence on why it is not working or what I should look at to find out why. I have a lab full of imaged Windows 7 machines with Office 2013 activating to a KMS server. I could recreate my image but this would be much quicker if I can get it to work. Thanks for any info you can provide Darren

  • Anonymous
    February 11, 2014
    Chris- I ran the rearm prior to sysprep and capture, however the office and lync 2013 that I have fails to connect to the KMS server so for now I have run "cscript ospp.vbs /act" to get around it. I tried to create a batch file to run the rearm and ospp.vbs in the registry under "RunOnce" in Local Machine but it fails to activate after reimaging, not sure if sysprep removes the key or what, let me know your thoughts, thanks.

  • Anonymous
    June 02, 2015
    I had installed the 32-bit edition of Office 2013 on a 64-bit operating system, %Program Files% is the Program Files (x86) folder... what do I need to change in the script of the already deployed machines?