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
Anonymous
January 01, 2003
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.Anonymous
January 01, 2003
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.Anonymous
January 01, 2003
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.Anonymous
August 12, 2013
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.. http://scorpits.blogspot.comAnonymous
May 15, 2014
Helped a lot. Very good info..Anonymous
June 03, 2014
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".Anonymous
June 26, 2014
Not finding the MP could also be a result of old GPO. check the locationServices.log and the del keys HKLMSoftwareMicrosoftSMSMobile Client
GPRequestedSiteAssignmentCode
GPSiteAssignmentRetryDuration(Hour)
GPSiteAssignmentRetryInterval(Min)Anonymous
August 12, 2014
Thanks that worked perfect...Anonymous
August 21, 2014
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.Anonymous
September 18, 2014
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...?Anonymous
November 11, 2014
Hi,
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?Anonymous
April 24, 2015
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.Anonymous
June 04, 2015
Great post Mike... :)Anonymous
June 12, 2015
I can't figure out how to do Steps 11 and 12.
11. rootcimv2sms WMI namespace
12 rootccm WMI namespaceAnonymous
June 19, 2015
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.Anonymous
July 23, 2015
The comment has been removedAnonymous
August 04, 2015
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.Anonymous
October 02, 2015
The comment has been removedAnonymous
November 03, 2015
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,
MartinAnonymous
November 13, 2015
Mike, has anyone put all your hard work into an automated vbscript or powershell that we can just run?Anonymous
November 16, 2015
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.Anonymous
November 29, 2015
Hello Mike,
thank you very much. It works perfectly.
So I could delete the agent successfully and reinstall it.
Best regards UdoAnonymous
January 06, 2016
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 advanceAnonymous
February 11, 2016
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)Anonymous
May 31, 2016
The comment has been removedAnonymous
June 23, 2016
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 ServicesStop-Service -Name ccmsetup -Force -ErrorAction SilentlyContinueStop-Service -Name CcmExec -Force Stop-Service -Name smstsmgr -Force Stop-Service -Name CmRcService -Force # Remove WMI NamespacesGet-WmiObject -Query "SELECT * FROM __Namespace WHERE Name='ccm'" -Namespace root | Remove-WmiObjectGet-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 SilentlyContinueRemove-Item -Path $MyPath\CcmExec -Force -Recurse -ErrorAction SilentlyContinueRemove-Item -Path $MyPath\smstsmgr -Force -Recurse -ErrorAction SilentlyContinueRemove-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 SilentlyContinueRemove-Item -Path $MyPath\CCMSetup -Force -Recurse -ErrorAction SilentlyContinueRemove-Item -Path $MyPath\SMS -Force -Recurse -ErrorAction SilentlyContinue# Remove Folders and Files$MyPath = $env:WinDirRemove-Item -Path $MyPath\CCM -Force -Recurse -ErrorAction SilentlyContinueRemove-Item -Path $MyPath\ccmsetup -Force -Recurse -ErrorAction SilentlyContinueRemove-Item -Path $MyPath\ccmcache -Force -Recurse -ErrorAction SilentlyContinueRemove-Item -Path $MyPath\SMSCFG.ini -Force -ErrorAction SilentlyContinueRemove-Item -Path $MyPath\SMS*.mif -Force -ErrorAction SilentlyContinueAnonymous
July 21, 2016
Excellent!!! Thank you so much!Anonymous
September 14, 2016
What about removing the files from IIS?- Anonymous
September 26, 2016
The Typical client isn't on an IIS server so that wasn't something I intended to cover in my blog post.
- Anonymous
Anonymous
December 08, 2016
The comment has been removedAnonymous
June 09, 2017
Great article!Have anyone made a script that automates these steps?- Anonymous
September 13, 2017
@Ola Holtbergethttps://mymstest.com/sccm-agent-komplett-deinstallieren/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)
- Anonymous
Anonymous
November 20, 2018
I must be dense but can't figure out what the various "*" and "**'' comments refer to, Mike!Anonymous
November 20, 2018
Mike.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?