Over the years of troubleshooting the SCCM Client, even with the built-in CCMEval task to attempt to watch and remediate client health of the SCCM Client, experience has shown to those of us in the trenches that sometimes, despite everything else, simply restarting the SMS Agent Host (aka, ccmexec service) will clear previously inexplicable issues. A service restart is often less disruptive to the end user than saying "have you tried a reboot yet".
If that scenario is something you've encountered in your environment, or you just want to be proactive (like some other companies) one way to accomplish an 'SMS Agent Host' restart is to ask the ccmeval task to do that for you. Kent Agerlund very kindly shared with me the edits they've done for their customers; and by doing so on their customers it was determined that overall, issues were reduced with the sccm client.
I've taken his edits, and created a couple of Configuration Items. It's the ccmeval.xml which indicates what tests should be run by the ccmeval scheduled task. Two tasks are added to ccmeval.xml:
- Restart CCMExec.exe-Stop
- Restart CCMExec.exe-Start
There are two --> attached <-- Configuration items. One is to modify the ccmeval.xml to add the stop/start actions. The other is to return the ccmeval.xml back to the original values (as of version Current Branch 1806 clients, but the ccmeval.xml hasn't changed in years, so it is anticipated it won't change in future version... but nothing is certain).
What you would do to test:
- Create a Baseline, let's call it "CCMEval Add Action to Restart CCMEXEC". Add ONLY the 1 Configuration Item, 'ccmeval.xml Add Service Restart', make it optional (not required).
- Deploy that baseline to a collection of TEST computers; to run daily, make sure you check the box for Remediation (not just monitor).
- On the client
- after the baseline of "CCMEval Add Action to Restart CCMEXEC" has run, go look at ccmeval.xml (it's usually in %windir%\ccm folder); and you should see the new actions have been added.
- if you are patient--wait overnight. The next day check in %windir%\ccm, for ccmevalreport.xml Open up that file and look for the actions of "Restart CCMExec.exe-Stop." and "Restart CCMExec.exe-Start." and they should have resultcodes of 0 (success). You might also want to take note of the time that ccmevalreport.xml was created. and then go look at %windir%\ccm\logs, for example, ccmexec.log or clientidmanagerstartup.log for entries around that time--you should notice that the logs indicated a service restart.
- if you are NOT patient... from cmd-prompt-as-admin, you can run ccmeval.exe from %windir%\ccm, and then look at the files and results as indicated above.
- Remove the Deployment of the baseline "CCMEval Add Action to Restart CCMEXEC" to your test collection.
- Create a Baseline called... "CCMEval Return to original", and add just and only 'ccmeval.xml Return to Original', make it optional (not required).
- Deploy the baseline to your collection of Test Computers, to run daily, make sure you check the box for Remediation (not just monitor)
- Confirm the ccmeval.xml gets set back to no longer have to 2 additional tasks
- Manually run ccmeval.exe after the xml is changed back, and/or wait overnight, to confirm that ccmeval runs, and no longer restarts the ccmexec service.
- Remove the Deployment of the Baseline "CCMEval Return to Original" (hopefully you'll never need this again... but...)
- Once you've satisfied yourself that you can not only modify the ccmeval.xml, but also return it to a pre-changed condition, then you will be confident (hopefully) to move forward.
Your next step (if you choose to go forward) is to deploy the "CCMEval Add Action to Restart CCMEXEC" to a collection of targets.
One thought...I personally would not deploy the xml change to any Server OS, and definitely not any of my SCCM Servers--because the Management Point processes use ccmexec. Restarting ccmexec on a Management Point role server might be fine... only you can say what makes sense in your infrastructure. If you restart SMS Agent Host on your Management Point Role servers outside of a reboot, what does that impact for you? anything? if no impacts, then sure. But YOU need to test, test, test.
You may be asking yourself why this blog article was titled 'politely' ... that's because the ccmeval scheduled task is designed to only run when the client isn't doing other important things, and the system is quiet. By design ccmeval tries to be quiet and discreet about when it runs, and randomized.
- Created on .