Manual removal of the SCCM client

As much as I love it, it may occasionally be necessary to remove the System Center Configuration Manager client.  I recently had a customer who could not get a machine to upgrade from 2007 to 2012 and after attempting many things we did a manual clean down of the client then the 2012 client installed just fine.  If you need to remove the client you can do so fairly easily by running ccmsetup.exe /uninstall.  Ccmsetup should exist on all clients, usually under the windows folder.  In the event that the command line doesn’t work here is a list of things I usually check and remove to manually clean-up all the traces of the client so I can try a fresh install.


1. SMS Agent Host Service

2. CCMSetup service (if present)

3. \windows\ccm directory

4. \windows\ccmsetup directory

5. \windows\ccmcache directory

6. \windows\smscfg.ini

7. \windows\sms*.mif (if present)

8. HKLM\software\Microsoft\ccm registry keys

9. HKLM\software\Microsoft\CCMSETUP registry keys

10. HKLM\software\Microsoft\SMS registry keys

11. root\cimv2\sms WMI namespace

12. root\ccm WMI namespace

13.  In Task Scheduler library, under "Microsoft" delete the "Configuration Manager" folder and any tasks within it.

14. In the Machine Certificate store delete any certs under the SMS\certificates folder

** I have been told that following these steps on a thin client PC has caused some issues.  I don't have any thin clients to play with so I am not able to verify at this time.  Use cautiously if you are trying this on a thin client and if you have any findings of interest please add the in the comments below.

* Updated 9/30 to add WMI info

* 4/25/16 - ThinPC concerns

*1/19/17 - Task Scheduler check added

*6/22/17 - Certs removal

Comments (34)
  1. Freddy – Good call. I missed WMI. We leave a few other inventory things in other places, but I updated the article to point out the main 2 namespaces to clean up.

  2. Hi Edy,
    I’m not aware of any major changes with R2 that would cause it to behave differently. You might try pushing and checking the boxes to force the uninstall/install, or do it manually and use the /forceinstall behavior and see if that helps. Beyond that it would
    take looking at the logs to try and determine the cause of failure and I can’t do that via blog comments so you would need to open a support case to get further assistance.

  3. Typically if you only have those two actions it means your client physically installed just fine but it can’t find a Management Point (MP) to communicate successfully with. Check your boundaries and location logs to see if it is a lack of knowing where
    to go, or if it knows but is failing due to something else like an authentication failure or such.

  4. Rajeesh says:

    This is awesome.. Very useful post in unusual times of SCCM client removal.. Thanks a lot. Will share the post on my blog with credits to you..

  5. Helped a lot. Very good info..

  6. Adelo says:

    We are having one heck of a time with certain systems that the ConfigMgr Client 2007 install would not complete. Albeit reads a successful installation the "Actions" tab only showed 2 Actions…."Machine and User Policy Retrieval & Eval Cycle".

  7. aaron says:

    Not finding the MP could also be a result of old GPO. check the locationServices.log and the del keys HKLMSoftwareMicrosoftSMSMobile Client

  8. Thanks that worked perfect…

  9. William says:

    Sigh, despite using this, I'm still running into situations in my environment where, every now and then, a client goes through the entire installation process, only to fail near the very end, and I'm having little to no luck with the installer logs.

    Still, this is good info.

  10. Freddy says:

    Hi! Just a thought…. What about WMI??? Do you delete something from there aswell? Wouldn't WMI classes and instances make a mess if you delete everything else manually…?

  11. Edy says:

    This is a great blog and very helpful. It can be annoying when a SCCM client stops working. I was able to manual delete the SCCM 2012 SP1 client following your instruction.

    However with SCCM 2012 R2 client the reinstall with ccmsetup doesn't work. Can it be that with R2 clients more leftovers need deletion?

  12. Patrick Stuart says:

    Not sure with other versions, but at least with SCCM 2012 R2 (CU3), in addition to your great steps, I also had to delete Configuration Manager Remote Control Service before I could delete the entire CCM folder.

    I deleted my namespaces using the following command as I didn't understand how to delete the namespace with CIM Tool…it seemed I could only delete its contents. I guess I wanted the entire namespaces truly deleted…please correct me if I'm overkill in the
    WMI cleanup.

    Invoke-Command -ComputerName $server {gwmi -query "SELECT * FROM __Namespace WHERE Name='CCM'" -Namespace "root" | Remove-WmiObject}

    My initial re-install failed to install its various sdf files, but a conventional uninstall (ccmsetup /uninstall) and reinstall seemed to do the trick. Verified this working on 2008R2 & 2012 machines.

  13. Great post Mike… 🙂

  14. Roshan says:

    I can't figure out how to do Steps 11 and 12.
    11. rootcimv2sms WMI namespace

    12 rootccm WMI namespace

  15. Roshan.. there are many WMI tools out there. I prefer to use WBEMTEST since it is built in to the OS. You can connect to one level higher than you want to delete, find the __Namespace and the instance you want to remove, then delete it. I have some general
    info on how to use WBEMTEST on this blog if you want some more pointers.

  16. kaff_H says:

    On the server, run wbemtest, click connect. In namespace type root. Press enum classes. Select recursive, press ok.

    Look for _NAMESPACE ( System class), double click it. Press instances on the right hand side. Look for Namespace.Name="sms" and delete it.

    On the server, in the start menu, look for configuration manager setup. There should be an option for maintenance. Then another option for SMS provider. In the box type the name of the server, it will show a warning about already existing, press yes. Let it

  17. svhelden says:

    I also had to remove c:windowssyswow64ccm* and use the (no longer downloadable) Installer Cleanup Utility to remove the old ConfigMgr client from the Installer database.

  18. Martin Ervin says:

    Need help. Trying to install the SCCM client manually on several DMZ servers using a script (e.g. ccmsetup.exe SMSITECODE=** SMSMP=SERVER FQDN.) It only installs the ccmsetup folder and the ccmsetup.log states the CCMSetup failed with error code 0X87d0029e.
    I've deleted the folder, run the ccmclean client and attempted to install the client manually with the same result. I did edit the Host file to list my Management Point. Please help.

  19. martin1963 says:

    Like Roshan I can’t figure steps 11 or 12 out.
    I ran WBEMTEST and was unable to find:

    rootcimv2sms WMI namespace

    rootccm WMI namespace

    Thank you,

  20. Chris says:

    Mike, has anyone put all your hard work into an automated vbscript or powershell that we can just run?

  21. Chris – Nobody has scripted it all that I know of. Many folks have done similar things, but I’m not aware of a posted script shared around.

  22. Udo Heuschmann says:

    Hello Mike,
    thank you very much. It works perfectly.
    So I could delete the agent successfully and reinstall it.
    Best regards Udo

  23. Nush says:

    hi, I unstalled the client from one of the machine and it worked but the software centre has disappeared now and won't come back if I tried to re-install using "C:windowsccmsetupccmsetup.exe /install but software centre centre is still missing. Any
    help will be much appreciated, Thanks in advance

  24. sam says:

    My Q is – we have been use SCCM from 2007 and now we are upgrade it to latest version 1511 new release.from this version we deployed new client. because of this client we are facing issue, some users can not open software center. Error msge is """Software
    Center cannot get the current status for some of the software. Software Center will list any items with available status. You can press F5 to refresh the view. If the problem persists, contact your help desk.
    More information:
    Loading Software Center returned error code 0x0041013 (-2147217389)."""

    Because of this issue we try client installation and Re-installation work around actually its worked.But we need to know from this un-installation and ccmcleaning process how effect my users. like are they reserved all the package again (they user these update
    and application packagers from last 5 years of time)

  25. Zap B. says:

    If you still have packages and adverts, then I would strongly recommend skipping step 10, because you will lose the client’s execution history. If you lose the execution history, then when the client reinstalls it will get piled on with adverts that have already run, assuming you have standing adverts.

  26. GuyverRS says:

    A powershell script to do all of the above would look something like this…

    Try { Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force -ErrorAction Stop } Catch {}

    # Stop Services
    Stop-Service -Name ccmsetup -Force -ErrorAction SilentlyContinue
    Stop-Service -Name CcmExec -Force
    Stop-Service -Name smstsmgr -Force
    Stop-Service -Name CmRcService -Force

    # Remove WMI Namespaces
    Get-WmiObject -Query “SELECT * FROM __Namespace WHERE Name=’ccm'” -Namespace root | Remove-WmiObject
    Get-WmiObject -Query “SELECT * FROM __Namespace WHERE Name=’sms'” -Namespace root\cimv2 | Remove-WmiObject

    # Remove Services from Registry
    $MyPath = “HKLM:\SYSTEM\CurrentControlSet\Services”
    Remove-Item -Path $MyPath\CCMSetup -Force -Recurse -ErrorAction SilentlyContinue
    Remove-Item -Path $MyPath\CcmExec -Force -Recurse -ErrorAction SilentlyContinue
    Remove-Item -Path $MyPath\smstsmgr -Force -Recurse -ErrorAction SilentlyContinue
    Remove-Item -Path $MyPath\CmRcService -Force -Recurse -ErrorAction SilentlyContinue

    # Remove SCCM Client from Registry
    $MyPath = “HKLM:\SOFTWARE\Microsoft”
    Remove-Item -Path $MyPath\CCM -Force -Recurse -ErrorAction SilentlyContinue
    Remove-Item -Path $MyPath\CCMSetup -Force -Recurse -ErrorAction SilentlyContinue
    Remove-Item -Path $MyPath\SMS -Force -Recurse -ErrorAction SilentlyContinue

    # Remove Folders and Files
    $MyPath = $env:WinDir
    Remove-Item -Path $MyPath\CCM -Force -Recurse -ErrorAction SilentlyContinue
    Remove-Item -Path $MyPath\ccmsetup -Force -Recurse -ErrorAction SilentlyContinue
    Remove-Item -Path $MyPath\ccmcache -Force -Recurse -ErrorAction SilentlyContinue
    Remove-Item -Path $MyPath\SMSCFG.ini -Force -ErrorAction SilentlyContinue
    Remove-Item -Path $MyPath\SMS*.mif -Force -ErrorAction SilentlyContinue

  27. Excellent!!! Thank you so much!

  28. expectthat says:

    What about removing the files from IIS?

    1. The Typical client isn’t on an IIS server so that wasn’t something I intended to cover in my blog post.

  29. Nick says:

    I tried running the below command and ran into the following error when trying to remove the ccm registry keys. I verified that the path exists, but it will still won’t remove them.

    PS C:\Users\admin\Documents> $mypath = “HKLM:\software\Wow6432Node\Microsoft”
    PS C:\Users\admin\Documents> Remove-Item -path $mypath\ccm -force -Recurse

    Remove-Item : Cannot delete a subkey tree because the subkey does not exist.
    At line:1 char:1
    + Remove-Item -path $mypath\ccm -force -Recurse
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : WriteError: (HKEY_LOCAL_MACH…e\Microsoft\ccm:String) [Remove-Item], ArgumentException
    + FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.RemoveItemCommand

  30. Ola Holtberget says:

    Great article!
    Have anyone made a script that automates these steps?

    1. Grischa says:

      @Ola Holtberget
      Sorry for german discription. Script comments are english. I used “GuyverRS” comment as template.
      Also I added the 64 Bit Registry that is missing in the original blog post. (I think we only need to delete the CCM folder – the SMS folder is from 2007. Maybe someone can confirm this)

  31. Dr. Velocity says:

    I must be dense but can’t figure out what the various “*” and “**” comments refer to, Mike!

  32. Dr. Velocity says:

    We have migrated from 32 bit SCCM 2007 client on Windows 7 x6t4 to 64 bit SCCM 2012 client on both W7 (x64)and W10 (x64) (perhaps a year or so ago.)
    There were no significant issues encountered. during migration upgrades.
    But now we just found a package from SCCM2007 was never migrated!
    Is this possibly still in 32 bit sccm 2007 CCMcache on a Windows 7 machine? If so what is the folder name?

Comments are closed.

Skip to main content