I ran into a problem over the last couple of days that I hadn’t encountered before: a System Center Configuration Manager client that wouldn’t talk to the management server, and wouldn’t uninstall. This was a Windows 10 laptop, which may have contributed to the issue. In the end I had to do some googlesleuthing to discover the answer, which required me to go full-on manual uninstall including removing registry keys to actually get the client out.
First I tried the standard ccmsetup.exe /uninstall which did exactly nothing. I tried both regular and administrator command prompts, but to no avail. My next step was to use the ccmclean.exe utility that was supposed to rip out any SCCM client install. For me and the Win10 laptop however, it didn’t get everything.
My final step was to do the manual uninstall. This requires the following which I found here:
- Removing these services (neither of these were present on the Win10 laptop that I could find):
- SMS Agent Host Service
- CCMSetup Service
- Removing the following directories:
- %windir%\ccm
- %windir%\ccmsetup
- %windir%\ccmcache
- Removing the following files:
- %windir%\smscfg.ini
- %windir%\sms*.mif
- Removing these registry keys:
- HKLM\Software\Microsoft\ccm
- HKLM\Software\Microsoft\CCMSETUP
- HKLM\Software\Microsoft\SMS
- Removing these WMI namespaces:
- Root\CIMV2\SMS
- Root\CCM
The last step presented a problem as the tools to edit WMI didn’t work on the Win10 computer. I found some PowerShell commands in the comments section of this page that are supposed to do this instead:
- get-wmiobject -computername [COMP] -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
Despite trying them both verbatim, fiddling with syntax, and rewording both as older-style PowerShell code, I couldn’t get either of those to work. Regardless, once I went through all those steps I was able to reinstall the SCCM client, and it now seems to work correctly.