2 Best Ways To Uninstall SCCM Client Agent

In this article, I will cover different methods to uninstall SCCM client agent. You can remove ConfigMgr agent completely from Windows computer using different methods.

This article describes every method that you can use to remove the ConfigMgr agent. You can learn which one works best for your organization and opt for that method.

If you have started to learn Configuration Manager, you might have heard about SCCM client agent. It is also known as Configuration Manager client agent or Configuration Manager agent.

There are many ways to install the Configuration Manger client agent on your Windows PCs. Here is the best article published on how to install SCCM client agent in Windows 11.

At times when you notice that Configuration Manager client agent isn’t installed correctly, you may want to remove or uninstall it.

Whenever you notice issues with ConfigMgr agent, you can always repair the SCCM client agent. Repairing the client agent involves uninstall SCCM client agent from Windows and re-install it.

What is SCCM Client Agent?

SCCM client agent is a piece of software that acts as an intermediate between the IT administrator’s actions and the actual policy enforcement and software deployment actions on the user’s system.

Most ConfigMgr admins prefer to uninstall SCCM client agent manually from the computers. You can also use a PowerShell script to uninstall SCCM agents from client computers. And some admins prefer to use SCCM client uninstall script available online.

While the methods used to uninstall SCCM client agent may differ, the objective is to cleanly remove ConfigMgr agent from the computer.

When you install SCCM agent, the Software Center is also installed on the computer. Read how to customize ConfigMgr software center appearance.

Read: Configuration Manager Remote Software Center

Method 1 – Uninstall SCCM Client Agent using CCMSETUP

You can manually uninstall SCCM client agent by running a simple command – ccmsetup.exe /uninstall.

  • On your Windows computer, run the command prompt as administrator.
  • Change the path to client agent location – C:\Windows\ccmsetup.
  • Run the command ccmsetup.exe /uninstall.
  • Restart your computer after you uninstall the client agent.
Uninstall SCCM Client Agent using CCMSETUP
Uninstall SCCM Client Agent using CCMSETUP

Method 2 – Remove SCCM Client Agent Using CCMCLEAN

Ccmclean.exe was a tool part developed by Microsoft and included with SMS 2003 toolkit that helps removal of the SCCM client. The SMS 2003 is very much outdated now but the ccmclean tool still works.

You may not find the ccmclean tool installer online, and I have saved a copy of this tool for you. Download the ccmclean tool from the OneDrive link. The ccmclean tool version that you get is 2.50.

The ccmclean tool works by detecting the SMS agent installer and uninstalling the agent on your computer. You have to run this tool manually on a computer to wipe out the SMS agent. You cannot use this tool to uninstall SCCM client remotely.

To uninstall SCCM client agent using ccmclean.exe:

  • Download the ccmclean.exe tool and copy it over to the target computer.
  • Run the ccmclean.exe as Administrator.
  • The tool uninstalls the SCCM agent and at the end a message box appears “Your system has been successfully cleaned“.
Remove SCCM Client Using CCMCLEAN
Remove SCCM Client Using CCMCLEAN

Your system has been successfully cleaned” confirms the SCCM client agent has been removed successfully by ccmclean tool.

Before reinstalling the ConfigMgr agent on this computer, restart your computer once. That was all about using ccmclean to remove the client agent from the system.

Remove SCCM Client Using CCMCLEAN
Remove SCCM Client Using CCMCLEAN

Monitor SCCM Client Agent Uninstall with Log Files

After you remove the ConfigMgr agent using ccmsetup, you must monitor the client agent uninstall. There are two ConfigMgr log files that you review to monitor the SCCM client agent uninstall process.

  • Ccmsetup.log – Provides information about client-based operating system actions. Can be used to troubleshoot client installation problems.
  • Client.msi_uninstall.log – Records the uninstallation of SCCM client agent on computer.

To monitor the SCCM client agent uninstall, go to C:\Windows\ccmsetup\Logs on the computer and open ccmsetup.log file to monitor the client uninstallation.

The line “CcmSetup is exiting with return code 0” in ccmsetup.log confirms that SCCM client agent has been removed successfully.

Monitor SCCM Client Agent Uninstall using ccmsetup.log
Monitor SCCM Client Agent Uninstall using ccmsetup.log

You can use any of the ConfigMgr log file viewers to open the .log files and review the log details.

The below log snippet is of ccmsetup.log from the C:\Windows\ccmsetup\Logs path on client computer. This log file records the details of ConfigMgr client removal.

==========[ ccmsetup started in process 6908 ]==========	ccmsetup
Running on platform X64
Detected client installed with version '5.00.9068.1026'	ccmsetup
Updated security on object C:\Windows\ccmsetup\cache\.	ccmsetup
Launch from folder C:\Windows\ccmsetup\	ccmsetup
CcmSetup version: 5.0.9068.1026	ccmsetup
Folder 'Microsoft\Microsoft\Configuration Manager' not found. Task does not exist.
Folder 'Microsoft\Microsoft\Configuration Manager' not found. Task does not exist.
Updating MDM_ConfigSetting.ClientDeploymentErrorCode with value 0
[CORPM1] Running on 'Microsoft Windows 10 Pro' (10.0.19044). Service Pack (0.0). SuiteMask = 272. Product Type = 18	ccmsetup	
Ccmsetup command line: "C:\Windows\ccmsetup\ccmsetup.exe" /uninstall
Task 'Configuration Manager Client Retry Task' does not exist
Uninstalling product '{D95FAB92-2BDF-488A-BE50-22B7C7C724D5}'.
Running installation package
  Product:     {D95FAB92-2BDF-488A-BE50-22B7C7C724D5}
  Log:         C:\Windows\ccmsetup\Logs\client.msi_uninstall.log
  Properties: 
MSI: Action 18:32:59: CcmRemoveSystemTask. Deletes a System Task from WMI.
MSI: Action 18:32:59: CcmRemoveEndpoint. Removes endpoint gathered in the action CcmRemoveEndpointsInit with WMI
MSI: Action 18:33:13: RemoveRegistryValues. Removing system registry values
Uninstall of product '{D95FAB92-2BDF-488A-BE50-22B7C7C724D5}' succeeded.	
Uninstall succeeded.
Deleted file C:\Windows\ccmsetup\ccmsetup.cab	ccmsetup
Failed to delete file '\\?\C:\Windows\ccmsetup\ccmsetup.exe' (5). Moving it to 'C:\CCM466F.tmp' and queuing for deletion on reboot.
Unable to load profiler: 0x80070002	ccmsetup
Could not retrieve value for MDM_ConfigSetting . Error 0x80041002
CcmSetup is exiting with return code 0	ccmsetup

The below log snippet is of client.msi_uninstall.log from the C:\Windows\ccmsetup\Logs path on client computer. This log file records the details of ConfigMgr client agent removal.

MSI (s) (50:B0) [17:40:37:417]: Product: Configuration Manager Client -- Removal completed successfully.
MSI (s) (50:B0) [17:40:37:417]: Windows Installer removed the product. Product Name: Configuration Manager Client. Product Version: 5.00.9068.1000. Product Language: 1033. Manufacturer: Microsoft Corporation. Removal success or error status: 0.
MSI (s) (50:B0) [17:40:37:417]: Value of RebootAction property is 
MSI (s) (50:B0) [17:40:37:417]: Windows Installer requires a system restart. Product Name: Configuration Manager Client. Product Version: 5.00.9068.1000. Product Language: 1033. Manufacturer: Microsoft Corporation. Type of System Restart: 2. Reason for Restart: 1.
MSI (s) (50:B0) [17:40:37:417]: Product: Configuration Manager Client. Restart required. The installation or update for the product required a restart for all changes to take effect.  The restart was deferred to a later time.
MSI (s) (50:B0) [17:40:37:433]: Deferring clean up of packages/files, if any exist
MSI (s) (50:B0) [17:40:37:433]: MainEngineThread is returning 3010
MSI (s) (50:64) [17:40:37:433]: RESTART MANAGER: Session closed.
MSI (s) (50:64) [17:40:37:433]: No System Restore sequence number for this installation.
=== Logging stopped: 3/28/2022  17:40:37 ===
MSI (s) (50:64) [17:40:37:433]: User policy value 'DisableRollback' is 0
MSI (s) (50:64) [17:40:37:433]: Machine policy value 'DisableRollback' is 0
MSI (s) (50:64) [17:40:37:433]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (50:64) [17:40:37:433]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (50:64) [17:40:37:433]: Note: 1: 2265 2:  3: -2147287035 
MSI (s) (50:64) [17:40:37:433]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (50:64) [17:40:37:433]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (s) (50:64) [17:40:37:433]: Post-install cleanup: removing installer file 'C:\Windows\Installer\11e95ea.msi'
MSI (s) (50:64) [17:40:37:449]: Post-install cleanup: removing installer file 'C:\Windows\Installer\11e95eb.msp'
MSI (s) (50:64) [17:40:37:449]: Post-install cleanup: removing installer file 'C:\Windows\Installer\188253b.msp'
MSI (s) (50:64) [17:40:37:449]: Destroying RemoteAPI object.
MSI (s) (50:24) [17:40:37:449]: Custom Action Manager thread ending.
MSI (c) (B0:CC) [17:40:37:449]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (c) (B0:CC) [17:40:37:449]: MainEngineThread is returning 3010

Final Thoughts

To uninstall SCCM client agent, you can use any of the methods covered in this post. Opt for the method that best suits your organization. Managing computers using SCCM is possible only when you install ConfigMgr agent. So ensure all your devices are running latest version of SCCM agent.

1 thought on “2 Best Ways To Uninstall SCCM Client Agent”

  1. These were the steps I was given by MSFT for a “deep” uninstall of the Client:

    Manual uninstall client:

    Run the command : ccmsetup.exe /uninstall

    Check below given things, if present then remove manually.

    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 turned these into a powershell script so our technicians can run it easily if required. It lacks logging or error checking, but it works.

    Reply

Leave a Comment