Jump to content

John McFadden

KMS Activation via an SCCM 2012 package

Recommended Posts

We have been using SCCM 2012 SP1 for a while now. We moved to KMS last summer but have yet to transfer over our Windows 7 imaging process over to it. I am working to create a package to auto activate Windows during the Task Sequence.


What I have done so far:

  • In Apply Windows Settings I have added the generic KMS product key (33PXH-7Y6KF-2VJC9-XBBR8-HVTHH)
  • I created a package to run a cmd file.
  • Here is the script:
    CD \Windows\System32
    cscript slmgr.vbs /skms (KMS server)
    cscript slmgr.vbs /ipk 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH
    cscript slmgr.vbs /ato
I have tried to place this package in numerous spots in my task sequence (TS) including after a reboot but it always fails out. When I go to the SMSTS.log file it has the same error - C004F074.
If I run my script once the TS is done, it runs without errors and activates windows to the KMS server. I would just like to have it automated rather than having to have all our technician run it manually after imaging their systems

Share this post

Link to post
Share on other sites

You could add a 'Run Commandline' Step for every line in the batch file.

So first Run Commandline cscript slmgr.vbs /skms, then with /ipk, then with /ato.


Because the scripts are in system32, you don't need to go to the specific folder(you can run these commands in any folder).


I have done it successfully this way before (however we only used the /ato command)

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...