SCCM

3 Best Ways to Repair SCCM Client Agent

In this post we will go through the steps to repair SCCM client agent. The best way to repair a Configuration Manager client agent is to use ccmrepair.exe. I will cover some additional methods using which you can easily fix your SCCM client agent issues by repairing it.

I often get emails asking the steps to repair SCCM client agent and I do reply to the emails with the repair steps. I hope with this post, I can now simply redirect this post to such questions or probably Google will.

You may want to repair sccm client when you notice issues with the client agent. Some prefer to uninstall the sccm agent and then install it. But when you have ccmrepair, you can easily repair sccm client agent using command line.

When you install Configuration Manager in your setup, you install the SCCM client agents on all your endpoints. After you install the agents, you can manage your endpoints using Configuration Manager.

When you want to install a Configuration Manager client agent on a computer, you use ccmsetup.exe command. By providing client installation parameters on the command line, you can modify the installation behavior. There is no repair parameter that you can run with ccmsetup.exe.

Repair SCCM Client Agent using CCMRepair.exe Command Line

Using CCMRepair.exe you can repair SCCM client agent via command line using below steps.

  • Login to your computer. Run the Command Prompt as Administrator.
  • Change the path to C:\Windows\CCM.
  • To begin the SCCM client agent repair, run the command ccmrepair.exe.
Repair SCCM Client Agent using CCMRepair
Repair SCCM Client Agent using CCMRepair

It takes few minutes to repair the ConfigMgr client agent. When I say repair, it basically means the client agent is reinstalled. If you see Done as status, it means the client agent repair is successfully complete.

C:\Windows\CCM>ccmrepair.exe
Repairing product {88B420C9-C484-4E20-8D02-C25243A36B80}…
Done.
Repair SCCM Client Agent using CCMRepair
Repair SCCM Client Agent using CCMRepair

You can monitor the SCCM client agent repair process by reviewing the ccmsetup.log. The ccmsetup.log file is located in C:\Windows\ccmsetup\Logs folder on the client computer.

The line CcmSetup is exiting with return code 0 confirms that SCCM client agent repair is completed successfully.

CcmSetup is exiting with return code 0
CcmSetup is exiting with return code 0

Some of you may have a concern that SCCM client agent repair might remove all the folders present in ccmcache folder. However when I verified this, if you run ccmrepair using command line, I noticed that folders were intact in ccmcache folder which is a good thing.

CCMCache Folder
CCMCache Folder

SCCM Client Agent Repair using Right Click Tools

Using the Right Click Tools, you can perform SCCM client agent repair with below steps.

  • Install the Right click tools extensions for ConfigMgr. Launch the Configuration Manager console.
  • Navigate to Assets and Compliance\Overview\Devices. Select a device for which you want to repair SCCM agent.
  • Right click the device and click Right Click Tools > Client Tools > Repair Client.
  • You get a dialog box that asks Are you sure you want to repair the client?. Click Yes.
SCCM Client Agent Repair using Right Click Tools
SCCM Client Agent Repair using Right Click Tools

Again, you can monitor the SCCM client agent repair process by monitoring the ccmsetup.log on the client computer.

One caveat of using the right click tools to repair SCCM client agent is it deletes the folders within ccmcache folder. The client cache is a temporary download location for software, applications and updates deployed to a client. The client cache is located in %windir%\ccmcache. So keep that in mind when you use right click tools to repair configuration manager client agent.

ccmcache folder empty
ccmcache folder empty

Using Run Script Repair Configuration Manager Client

Once again you can use ccmrepair.exe to repair the client agent but this time we will use it with Run Script feature in SCCM. The advantage of this method is it allows you to repair Configuration Manager client on a single computer and even multiple computers at once.

In the Configuration Manager console, go to Software Library\Overview\Scripts. Right click Scripts and click Create Script. On the Script details window, specify a script name such as Repair SCCM Client Agent and select the script language as PowerShell. Under Script, we will use ccmrepair command to repair Configuration Manager client agent. Enter the below command and click Next.

C:\windows\ccm\ccmrepair.exe
Using Run Script Repair Configuration Manager Client
Using Run Script Repair Configuration Manager Client

On the Completion window, click Close.

Using Run Script Repair Configuration Manager Client
Using Run Script Repair Configuration Manager Client

When you create a new script in Configuration Manager, you must approve the script. Sometimes the approve deny button may be disabled. Here is a solution to fix approve deny button disabled in SCCM.

Right click the SCCM client agent repair script and click Approve.

Approve the SCCM Client Repair Script
Approve the SCCM Client Repair Script

Once the client repair script is approved, go to devices. Select a device, right click and Run Script. As I mentioned before you can also run the client repair script on device collections as well.

Run Script SCCM Client Repair
Repair SCCM Client Agent

Select the repair SCCM client agent script and click Next.

Run Script SCCM Client Repair
Run Script SCCM Client Repair

Running this script will repair Configuration Manager client agent on device(s). On the client computer review the ccmsetup.log to monitor the client agent repair process.

Repair SCCM Client Agent
Repair SCCM Client Agent

SCCM Client Agent Repair FAQ

Some of the commonly asked questions and answers related to Configuration Manager client agent repair.

What is CCMRepair.exe?

ccmrepair.exe is an executable that allows you to repair Configuration Manager client agent.

What is the location of CCMRepair?

The ccmrepair file is located in C:\windows\ccm\ folder.

How do I Repair SCCM client agent?

To repair SCCM client agent on a computer, run ccmrepair.exe that is located in C:\windows\ccm\ folder.

What is the log file for CCMRepair?

You can monitor the SCCM client agent repair process by reviewing the ccmsetup.log. The ccmsetup.log file is located in C:\Windows\ccmsetup\Logs folder on the client computer.

How to Confirm Client Repair is Successful?

The line CcmSetup is exiting with return code 0 in ccmsetup.log confirms the client agent repair is successful.

Prajwal Desai

Hi, I am Prajwal Desai. For last few years I have been working on multiple technologies such as SCCM / Configuration Manager, Intune, Azure, Security etc. I created this site so that I can share valuable information with everyone.

Related Articles

3 Comments

  1. Dear Prajwal,

    if I did the SCCM Client installation from a .bat file with parameters and after that I try to fix the corrupted client with CCMRepair it will keep the options?

  2. If the high speed communication channel is still functional and sometimes it is, the run script will work just fine.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button