Best Way To Uninstall SCCM Client | Remove ConfigMgr Client HTMD Blog (2024)

This blog post will learn the best way to uninstall SCCM clients in different ways. You have several options to remove the ConfigMgr client from Windows 11 or Windows 10 PCs.

Let’s understand the best way to uninstall the SCCM client (How to Remove ConfigMgr Client) from a Windows 10 or Windows 11 device.

SCCM Client agent removal and cleanup is the most challenging part for many ConfigMgr Admins because there are different ways to uninstall or remove the ConfigMgr client. We will also see how to remove device records from the SQL database.

The following is one of the top viewed posts – How to Uninstall Remove SCCM Client using CCMClean exe | ConfigMgr. Microsoft anymore supports the CCMCean tool, but I could see it still works.

Best Way To Uninstall SCCM Client | Remove ConfigMgr Client HTMD Blog (1)

I don’t recommend uninstalling the ConfigMgr client using the CCMClean tool even though it will work (shh – I still believe this tool removes the client more cleanly).

Don’t worry about the source files of ConfigMgr Client software. I will share the details of source file locations in the following section of this post. The client agent source files can be obtained from both the server and the client-side.

Remove ConfigMgr Client from Database

Before getting into the client software removal process, let’s understand how to remove the ConfigMgr client from SCCM SQL Database?.

Removing the ConfigMgr client software from Windows 10 computers does not remove the clients from the site database. The clients that are not updated are automatically purged from the site database after a while, depending on maintenance tasks /clean-up activities.

Best Way To Uninstall SCCM Client | Remove ConfigMgr Client HTMD Blog (2)

When you want to remove these clients immediately from the SMS site database, use the SCCM Administrator console to delete them.

  • Navigate to \Assets and Compliance\Overview\Devices.
  • Select the device record you want to delete.
  • Click on the Delete button.
Best Way To Uninstall SCCM Client | Remove ConfigMgr Client HTMD Blog (3)

Click the DELETE button from Confirm Deletion Window.

Best Way To Uninstall SCCM Client | Remove ConfigMgr Client HTMD Blog (4)

Source File Location to Remove SCCM Client (Uninstall SCCM Client)

As I mentioned above, The client agent source files can be obtained from both the server and the client-side. The following is the location of the client source files C:\Windows\ccmsetup.

You can use the CCMSetup.exe file from the Windows 10 devices. You can also get the latest Configuration Manager source files from the primary server share folder.

  • Client Side (Windows 10) – C:\Windows\ccmsetup
  • Server Side – \\ServerName\sms_COD\Client
    • Replace Servername with your primary server FQDN.
    • Replace COD with ConfigMgr site code.
Best Way To Uninstall SCCM Client | Remove ConfigMgr Client HTMD Blog (5)

Uninstall SCCM Client using CCMSetup.exe Command Line

You can use the command-line option to remove the SCCM client from Windows PCs. Let’s understand uninstall SCCM Client using CCMSetup.exe the command-Line.

The deletion of a device record from the Configuration Manager console won’t remove the client agent software from Windows 10 devices.

To remove or clean up the end-to-end configurations of client software using the following command-line tool.

  • Open a Windows command prompt with the administrator’s permission.
  • Change the folder to the location as mentioned above
    • Run the following command cd %windir%\ccmsetup
  • Run the following command: CCMSetup.exe /uninstall
Best Way To Uninstall SCCM Client | Remove ConfigMgr Client HTMD Blog (6)

Logs Best Way to Uninstall SCCM Client | Remove ConfigMgr Client

The SCCM client uninstallation process using CCMSetup.exe displays no results on the screen. However, you can watch the progress of the uninstall by reading the CCMSetup.log file using the CMTrace tool.

  • Location of the log file: %windir%\ccmsetup\logs\CCMSetup.log

CCMClean to Remove SCCM clientUninstall SCCM Client using CCMClean

You can try to uninstall or remove ConfigMgr Client using the CCMClean.exe tool. This is also a command-line tool. I have a more detailed explanation of the CCMClean tool in the following post. How to Uninstall Remove SCCM Client using CCMClean exe | ConfigMgr.

Well, CCMClean is not tested (extensively) and certified by Microsoft for the products ConfigMgr 2007/2012/CB. However, it may or may not work.

In my experience, the CCMClean.exe can successfully remove/uninstall ConfigMgr/SCCM 2007, 2012, and CB client components. More details are below……

Download – >CCMClean.exe

NOTE! – Microsoft does not support CCMClean.

Best Way To Uninstall SCCM Client | Remove ConfigMgr Client HTMD Blog (7)
  • The command-line parameters can be used with CCMClean.exe.
  • Try and check out using “CCMClean.exe /?”
  • Silent install –> ccmclean.exe /q
Best Way To Uninstall SCCM Client | Remove ConfigMgr Client HTMD Blog (8)

Verify SCCM Client Agent Uninstall

Let’s check Verify SCCM Client Agent Uninstall using the log files and WMI. I’ve tested CCMClean.exe on SCCM / ConfigMgr 2012 client and it did work perfectly !!!

  • a) Verify the CCMClean.log file to get more details.

CCMCleanup Logfile location = “C:\Users\administrator\appdata\local\temp” OR %temp%

  • b) Check the event log for some more details or confirmation about the SCCM Client Agent Uninstall.

Check whether the registry entry has been REMOVED from the SCCM client agent as part of the SCCM client agent uninstall process.

You can also confirm whether the SMS Agent Host service has been REMOVED as a part of the SCCM client agent uninstall process.

You can use WBEMTEST to check whether SCCM client-related WMI namespaces (root\ccm and root\cimv2\SMS) have been REMOVED or not, as shown in the below screenshot. Once the SCCM client agent is removed or uninstalled, these WMI namespaces should also get removed.

Best Way To Uninstall SCCM Client | Remove ConfigMgr Client HTMD Blog (9)

PowerShell Script to Uninstall SCCM Client

Robertomoir shared a PowerShell script to uninstall or remove the SCCM client including all the related folders. If you are a PowerShell enthusiast, use this method to uninstall or remove the SCCM client.

  • remove-sccm_remove-sccmagent.ps1 – All credits to Rob Moir.
# Run SSCM remove# $ccmpath is path to SCCM Agent's own uninstall routine.$CCMpath = 'C:\Windows\ccmsetup\ccmsetup.exe'# And if it exists we will remove it, or else we will silently fail.if (Test-Path $CCMpath) { Start-Process -FilePath $CCMpath -Args "/uninstall" -Wait -NoNewWindow # wait for exit $CCMProcess = Get-Process ccmsetup -ErrorAction SilentlyContinue try{ $CCMProcess.WaitForExit() }catch{ }}# Stop ServicesStop-Service -Name ccmsetup -Force -ErrorAction SilentlyContinueStop-Service -Name CcmExec -Force -ErrorAction SilentlyContinueStop-Service -Name smstsmgr -Force -ErrorAction SilentlyContinueStop-Service -Name CmRcService -Force -ErrorAction SilentlyContinue# wait for services to exit$CCMProcess = Get-Process ccmexec -ErrorAction SilentlyContinuetry{ $CCMProcess.WaitForExit()}catch{} # 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# Set $CurrentPath to services registry keys$CurrentPath = “HKLM:\SYSTEM\CurrentControlSet\Services”Remove-Item -Path $CurrentPath\CCMSetup -Force -Recurse -ErrorAction SilentlyContinueRemove-Item -Path $CurrentPath\CcmExec -Force -Recurse -ErrorAction SilentlyContinueRemove-Item -Path $CurrentPath\smstsmgr -Force -Recurse -ErrorAction SilentlyContinueRemove-Item -Path $CurrentPath\CmRcService -Force -Recurse -ErrorAction SilentlyContinue# Remove SCCM Client from Registry# Update $CurrentPath to HKLM/Software/Microsoft$CurrentPath = “HKLM:\SOFTWARE\Microsoft”Remove-Item -Path $CurrentPath\CCM -Force -Recurse -ErrorAction SilentlyContinueRemove-Item -Path $CurrentPath\CCMSetup -Force -Recurse -ErrorAction SilentlyContinueRemove-Item -Path $CurrentPath\SMS -Force -Recurse -ErrorAction SilentlyContinue# Reset MDM Authority# CurrentPath should still be correct, we are removing this key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DeviceManageabilityCSPRemove-Item -Path $CurrentPath\DeviceManageabilityCSP -Force -Recurse -ErrorAction SilentlyContinue# Remove Folders and Files# Tidy up garbage in Windows folder$CurrentPath = $env:WinDirRemove-Item -Path $CurrentPath\CCM -Force -Recurse -ErrorAction SilentlyContinueRemove-Item -Path $CurrentPath\ccmsetup -Force -Recurse -ErrorAction SilentlyContinueRemove-Item -Path $CurrentPath\ccmcache -Force -Recurse -ErrorAction SilentlyContinueRemove-Item -Path $CurrentPath\SMSCFG.ini -Force -ErrorAction SilentlyContinueRemove-Item -Path $CurrentPath\SMS*.mif -Force -ErrorAction SilentlyContinueRemove-Item -Path $CurrentPath\SMS*.mif -Force -ErrorAction SilentlyContinue 

Automation Option to Remove SCCM Client from Multiple Windows PCs

You will have some options to remove the SCCM client automatically using PSExec or another scripting method. We can run the CCMSetup.exe or CCMClean.exe on multiple remote machines usingPSEXEC.exe. You should have administrative privileges on that remote machine.

Resources

  • How to Uninstall Remove SCCM Client using CCMClean exe | ConfigMgr
  • SCCM OneTrace Log Viewer to Replace CMTrace

Author

Best Way To Uninstall SCCM Client | Remove ConfigMgr Client HTMD Blog (2024)

FAQs

Best Way To Uninstall SCCM Client | Remove ConfigMgr Client HTMD Blog? ›

If the value of ProvisioningMode is True in the following registry key: HKLM\Software\Microsoft\CCM\CcmExec, then the client is on provisioning mode. Remove the client out of provisioning mode and modify the value of ProvisioningMode to False in the following registry key: HKLM\Software\Microsoft\CCM\CcmExec.

How to completely remove SCCM Client? ›

Uninstall SCCM Client
  1. In your Configuration Manager console, right-click on a device.
  2. Click Right Click Tools > Client Tools > Uninstall SCCM Client.
  3. Confirm that you want to uninstall the client.
Dec 20, 2022

How do I remove SCCM Client from provisioning mode? ›

If the value of ProvisioningMode is True in the following registry key: HKLM\Software\Microsoft\CCM\CcmExec, then the client is on provisioning mode. Remove the client out of provisioning mode and modify the value of ProvisioningMode to False in the following registry key: HKLM\Software\Microsoft\CCM\CcmExec.

How to uninstall an application through SCCM? ›

Uninstall deployed products with Configuration Manager
  1. Navigate to the folder containing the administrative image for the product you want to uninstall.
  2. Copy the Install <deployment name>. ...
  3. Rename the copy to Uninstall.bat.
  4. Open Uninstall. ...
  5. Activate the uninstall command (the last line of the script) by removing rem.

How do I remove MP from SCCM? ›

Navigate to Overview\Site Configuration\Servers and Site System Roles. From the list of servers, select the server installed with MP role. Right-click on Management Point role and select Remove Role. Click on Yes to confirm the removal of the MP role from the site system server.

How do I clear SCCM cache on client? ›

Configure the cache on the client computer
  1. On the client computer, open the Configuration Manager control panel.
  2. Switch to the Cache tab. Set the space and location properties. The default location is %windir%\ccmcache.
  3. To delete the files in the cache folder, choose Delete Files.
Sep 7, 2023

How do I uninstall a client? ›

Method 2: Uninstall PC Client via Apps and Features/Programs and Features. Look for PC Client in the list and click on it. The next step is to click on uninstall, so you can initiate the uninstallation.

How do I uninstall a provisioning package? ›

Provisioning packages can be removed by an administrator by using the Add or remove a provisioning package available under Settings > Accounts > Access work or school.

How do I disable deployment Configuration Manager? ›

Select an app that you've deployed. In the details pane, switch to the Deployment tab. Select a deployment. In the ribbon, on the Deployment tab, select Disable.

How do I remove CCMSetup from powershell? ›

Uninstall the client
  1. Open a Windows command prompt as an administrator. Change the folder to the location in which CCMSetup.exe is located, for example: cd %windir%\ccmsetup.
  2. Run the following command: CCMSetup.exe /uninstall.
Oct 3, 2022

How do I force an application to uninstall? ›

Press down the CTRL + SHIFT + ESC keys together to open the Task Manager. It should already be on the processes tab. Select the Program or App that you want to uninstall from the list under processes. Now try running the uninstall on the Program or App again.

Which way is the best way to uninstall an application? ›

Uninstall in Settings

Select Start > Settings > Apps > Apps & features . Find the app you want to remove, select More > Uninstall.

How do I delete unwanted applications? ›

Delete apps that you installed
  1. Open the Google Play Store app .
  2. At the top right, tap the Profile icon.
  3. Tap Manage apps & devices. Manage.
  4. Select the name of the app you want to delete.
  5. Tap Uninstall.

How do I uninstall Microsoft system Center Configuration Manager? ›

Uninstall SCCM Client using CCMSetup.exe Command Line
  1. Open a Windows command prompt with the administrator's permission.
  2. Change the folder to the location as mentioned above. Run the following command cd %windir%\ccmsetup.
  3. Run the following command: CCMSetup.exe /uninstall.
Sep 28, 2022

How do I remove SCCM from Active Directory? ›

Re: Remove old SCCM configuration from AD

Delete the old objects in the System Management container, don't delete the System Management container, just the objects, including sub-containers. Check DNS for management point records and delete them as well.

How do I clear SCCM logs? ›

Delete SCCM IIS Logs Files Manually
  1. In the Start a Program section, entrer the following command : Forfiles.exe -p C:\inetpub\logs\LogFiles\W3SVC1 -m *.log -d -30 -c “Cmd.exe /C del @path\”
  2. You can change the number of days if desired (30)
Jul 25, 2022

How do I delete inactive clients in SCCM site maintenance? ›

Two Site Maintenance tasks control stale record deletion in SCCM. Within the Configuration Manager console, these can be accessed under Administration/Site Configuration/Sites – Site Maintenance. Within Site Maintenance, you will see two tasks named: Delete Aged Discovery Data and Delete Inactive Client Discovery Data.

How do I remove a device from all collections in SCCM? ›

1. In your Configuration Manager console, right-click on a device collection. 2. Click Right Click Tools > Collection Tools > Remove Devices from Collection(s).

References

Top Articles
Latest Posts
Article information

Author: Ouida Strosin DO

Last Updated:

Views: 5988

Rating: 4.6 / 5 (76 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Ouida Strosin DO

Birthday: 1995-04-27

Address: Suite 927 930 Kilback Radial, Candidaville, TN 87795

Phone: +8561498978366

Job: Legacy Manufacturing Specialist

Hobby: Singing, Mountain biking, Water sports, Water sports, Taxidermy, Polo, Pet

Introduction: My name is Ouida Strosin DO, I am a precious, combative, spotless, modern, spotless, beautiful, precious person who loves writing and wants to share my knowledge and understanding with you.