Repair – Fix
Locally
“C:\Windows\ccm\ccmrepair.exe”
Remotely
psexec \\RemoteComputerName -u administrator -p PASSWORD cmd.exe /c c:\windows\ccm\ccmrepair.exe
PowerShell
Function RepairClient([String] $strComputer) { $SMSCli = [wmiclass] "\\$strComputer\root\ccm:sms_client" $SMSCli.RepairClient() }
Removal – Uninstall
Locally
“C:\Windows\ccmsetup\CCMSetup.exe” /uninstall
or
Use the CCMClean Tool | 2 | 3
Remotely
psexec \\RemoteComputerName -u administrator -p PASSWORD cmd.exe /c c:\windows\ccmsetup\ccmsetup.exe /uninstall
Things to Check for During Removal
* remove these items
- stop CCMExec service (primary service)
- stop CCMSetup service
- kill ccmexec.exe process (primary process)
- kill ccmsetup.exe process
- delete C:\Windows\ccm (primary folder)
- delete C:\Windows\ccmsetup
- delete C:\Windows\ccmcache
- delete C:\Windows\smscfg.ini
- delete C:\Windows\sms*.mif
- delete HKLM\software\Microsoft\ccm (primary key)
- delete HKLM\software\Microsoft\CCMSETUP
- delete HKLM\software\Microsoft\SMS (secondary key)
- delete HKLM\Software\Microsoft\NAL
- delete HKLM\System\CurrentControlSet\Services\clisvcl
- delete HKLM\System\CurrentControlSet\Services\ccmexec
- delete HKLM\software\Microsoft\Systemcertificates\SMS\Certificates
- delete root\cimv2\sms WMI
- delete root\ccm WMI
- Task Scheduler, under Microsoft: Delete the Configuration Manager folder
- Machine Certificate store: Delete certs under SMS\certificates
- delete device from SCCM (don’t forget this)
Extra
Delete any certificates
run Certlm.msc > Personal > Certificates > delete machinename certs (ones for SCCM[PKI])
run Certlm.msc > SMS > Certificates > delete SMS certs
Notes
CCMSetup Properties at Microsoft
Evaluate Machine Policy
Locally
“C:\windows\ccm\ccmeval.exe”
Remotely
psexec \\RemoteComputerName -s “C:\windows\ccm\ccmeval.exe”
VBScript
On Error Resume Next Dim oCPAppletMgr Set oCPAppletMgr = CreateObject("CPApplet.CPAppletMgr") Dim oClientActions Set oClientActions = oCPAppletMgr.GetClientActions() Dim oClientAction For Each oClientAction In oClientActions If oClientAction.Name = "Request and Evaluate Machine Policy" Then oClientAction.PerformAction End If Next
tags: repair sccm, repair sccm agent, fix cm agent, MrNetTek, ccmclean, ccmuninstall, uninstall sccm agent, remove sccm agent, uninstall sccm client