SCCM: Clean uninstall and reinstall of a broken ConfigMgr client
On this page
When a ConfigMgr client stops reporting, won’t take policy and a repair does nothing, a clean uninstall and reinstall is usually faster than chasing it further. Here’s the order I follow.
1. Uninstall
From an elevated prompt:
Start-Process -FilePath "$env:WINDIR\ccmsetup\ccmsetup.exe" -ArgumentList '/uninstall' -Wait
ccmsetup returns immediately and keeps working in the background, so watch the log rather than the prompt:
C:\Windows\ccmsetup\Logs\ccmsetup.log
Wait for the line saying ccmsetup is exiting with return code 0.
2. Clear the leftovers
Stop-Service -Name ccmexec -Force -ErrorAction SilentlyContinue
Remove-Item "$env:WINDIR\CCM", "$env:WINDIR\ccmcache", "$env:WINDIR\ccmsetup" -Recurse -Force -ErrorAction SilentlyContinue
Get-CimInstance -Namespace root -ClassName __Namespace -Filter "Name='ccm'" | Remove-CimInstance
3. Reinstall
\\<SiteServer>\SMS_<SiteCode>\Client\ccmsetup.exe /mp:<ManagementPoint> SMSSITECODE=<SiteCode>
4. Verify
ccmsetup.logends with return code0C:\Windows\CCM\Logs\ClientIDManagerStartup.logshows registration- Configuration Manager in Control Panel shows the site code and lists actions on the Actions tab