How To Restart SMS Agent Host Service | Restart SCCM Client

In this article, I will share multiple ways to restart SMS agent host service on remote computer. You can restart SCCM client agent to resolve issues with the client.

The SMS agent host service (ccmexec.exe) provides change and configuration services for computer management systems. This service is installed when you install the SCCM client, and it runs on the client agent systems and management points.

The CcmExec.log on the client computer tracks the client’s activities and SMS agent host service information. This log file is located in C:\Windows\CCM\Logs on the client computer. Take a look at all the important client logs in SCCM.

In order to restart the SCCM client, the Configuration Manager client should be online and the SMS agent host service should be running. Let’s explore multiple ways to restart the Configuration Manager client service.

Manually Restart SMS Agent host service on a computer

You can manually restart the SMS agent host service using the services console. Launch the services console with the services.msc shortcut command. From the list of services, right-click the SMS Agent Host service and select Restart. This action will restart SCCM client on the computer.

Manually Restart SMS Agent host service on a computer
Manually Restart SMS Agent host service on a computer

After the ccmexec.exe service is restarted successfully, the state of the SMS agent host service changes from stopped to running.

Read: Find Installed service using CMPivot in SCCM

Restart SMS Agent Host Services using Right Click Tools

You can restart SMS agent host service using Right Click Tools from the ConfigMgr console with the following steps:

  • Launch the Configuration Manager console.
  • Navigate to Assets and Compliance\Overview\Devices.
  • Right-click a device and select Right Click Tools > Client Tools > Restart SMS Agent Host Service.
Restart SMS Agent Host Services using Right Click Tools
Restart SMS Agent Host Services using Right Click Tools

Note: With Right Click Tools, you can run the restart SMS Agent host service action on individual devices and on entire device collections. If you want to restart the SCCM client service on multiple computers, you can trigger the client restart on the entire device collection.

Recommended: Learn how to install Right Click Tools console extension for SCCM

Restart SMS Agent Host Service using CMD Prompt

In Windows, you can manage services using command prompt. For example, you can list all the services running on a computer, start the services and stop them. You can use the command prompt to start and stop the SCCM client service.

  • Launch the command prompt as administrator.
  • To stop the service – net stop ccmexec
  • To start the service – net start ccmexec
Restart SMS Agent Host Service using CMD Prompt
Restart SMS Agent Host Service using CMD Prompt

Read: How to restart SCCM SMS EXECUTIVE Service

Restart ConfigMgr Client service using PowerShell

You can restart the ConfigMgr client service using PowerShell with following steps:

  • Launch the PowerShell as administrator.
  • Run the command Restart-Service -Name CcmExec.
  • The SMS agent host service is stopped and then started.
Restart ConfigMgr Client service using PowerShell
Restart ConfigMgr Client service using PowerShell

To confirm if the ccmexec.exe service is up and running, run the PowerShell command “Get-Service -Name CcmExec“. In the below screenshot, we see the status as Running which confirms the ccmexec.exe service is successfully restarted.

Restart ConfigMgr Client service using PowerShell
Restart ConfigMgr Client service using PowerShell

Read: How to repair SCCM Client agent

CCMExec.log – Monitor SMS Client Restart Process

After you restart the SCCM client on a computer, you can monitor the client restart process using ccmexec.log. The ccmexec.log records the activities of the client and the SMS Agent Host service. This log file is located in C:\Windows\CCM\Logs on the computer.

The below log snippet shows the activity after the SMS agent host service is restarted. During the SCCM client restart, the Software Center and Configuration Manager client actions are unavailable.

Shutting down CCMEXEC…
BEGIN ExecuteSystemTasks('PreShutdown')
Invoking system task 'StatusAgentShutdown'.
Invoking system task 'PolicyEvaluator_PreShutdown' via ICcmSystemTask2 interface.
Invoking system task 'MtcShutdown'.
END ExecuteSystemTasks('PreShutdown')
BEGIN ExecuteSystemTasks('Shutdown')
Invoking system task 'CliSrvShutdown' via ICcmSystemTask2 interface.
Invoking system task 'SchedulerShutdown'.
Invoking system task 'MtrMgrShutdown'.
Invoking system task 'SCShutdown' via ICcmSystemTask2 interface.
Invoking system task 'CertEnrollAgentShutdownTask'.
Invoking system task 'PwrAgentShutdownTask'.
Invoking system task 'BgbAgentShutdownTask'.
Invoking system task 'ComplRelayAgentShutdownTask'.
Invoking system task 'ExecmgrShutdown'.
Invoking system task 'WinPEBranchCacheShutdown'.
Invoking system task 'DeltaDownloadServiceShutdown'.
Invoking system task 'SrvWinMgrShutdown'.
Invoking system task 'DCMAgent_Shutdown'.
Invoking system task 'UpdatesDeploymentShutdownTask'.
Invoking system task 'CIAgent_Shutdown'.
Invoking system task 'CIDownloader_Shutdown'.
Invoking system task 'CIStateStore_Shutdown'.
Invoking system task 'CIStore_Shutdown'.
Invoking system task 'CcmProfilerShutdown' via ICcmSystemTask2 interface.
END ExecuteSystemTasks('Shutdown')
CUpdatesAgent::FinalRelease entered CcmExec
Waiting up to 2 seconds for active tasks to complete…
Finished shutting down CCMEXEC.
Unregistering Power Events CcmExec
ServiceWindowManager::FinalRelease entered CCMEXEC
ServiceWindowManager::FinalRelease entered CCMEXEC
Starting CCMEXEC service… CcmExec
Running on machine CORPAD as user SYSTEM. CcmExec
Initializing COM. CcmExec
Registering for logging change notifications. CcmExec
Setting default logging component for process. CcmExec
Setting service status to RUNNING. CcmExec
Checking configuration. CcmExec
Successfully Created Thread for CheckConfiguration. Waiting for Configuration to Complete CcmExec
Starting phase 0 initialization. CcmExec
Initializing exception handlers. CcmExec
Initializing performance counters. CcmExec
Initializing thread pool. CcmExec
Initializing task engine. CcmExec
Initializing system task processor. CcmExec
Initializing network entry points. CcmExec
Registering for Network Change Events. CcmExec
Creating global objects. CcmExec
Initializing power state manager. CcmExec
Detected not running on Windows Virtual Desktop CcmExec
*** Keep the system awake CcmExec
Initializing network state manager. CcmExec
CCMExec is currently NOT hosting a Management Point.
[Resource-Network] CONNECTED
Queued timer to detect if network is changed.
[Resource-NetworkCost] UNRESTRICTED CcmExec
Initializing task scheduler.
Refresh CCM Identity using any registered identity stores
Entering Certificate Maintenance
Loading service settings. CcmExec
Completed phase 0 initialization. CcmExec
Asynchronously verifying WMI performance counter classes.
Posting task to perform phase 1 initialization.
SystemTaskProcessor::QueueEvent(PowerChanged, 0) CCMEXEC
SystemTaskProcessor::QueueEvent(PowerChangedEx, 0) CCMEXEC
SystemTaskProcessor::QueueEvent(PowerChanged, 0) CCMEXEC
SystemTaskProcessor::QueueEvent(PowerChangedEx, 0) CCMEXEC
SystemTaskProcessor::QueueEvent(PowerChanged, 0) CCMEXEC
SystemTaskProcessor::QueueEvent(PowerChangedEx, 0) CCMEXEC
SystemTaskProcessor::QueueEvent(PowerChanged, 0) CCMEXEC
[Resource-Idle] User is present CCMEXEC
SystemTaskProcessor::QueueEvent(PowerChangedEx, 0) CCMEXEC
SystemTaskProcessor::QueueEvent(PowerChanged, 0) CCMEXEC
[Resource-CS] Leaving CS CCMEXEC
Starting phase 1 initialization.
Initializing messaging subsystem.
SystemTaskProcessor::QueueEvent(PowerChangedEx, 0) CCMEXEC
Entering main message loop.
Registering for Logon/Logoff notifications.
Found user S-1-5-21-390587728-612061534-3871974757-500 on session 1
Added CCM (user, session) is: (S-1-5-21-390587728-612061534-3871974757-500,1).
Cached user 'S-1-5-21-390587728-612061534-3871974757-500' is logged on to session 1 during RegisterForLogon.
Invoking task to monitor cached logged on user every 600 seconds.
Registering built-in COM class objects.
Registering hosted COM class objects.
Error registering hosted class '{53C46006-E1C5-4AD1-89B3-B8332D1B17EA}'. Code 0x80040111
Allowing activation requests on class objects.
Registering endpoint notifications.
IsTerminalServer: 1, IsSingleUserTS: 1
Starting system task processor.
BEGIN ExecuteSystemTasks('PreStartup')
Invoking system task 'DynamicRegPreStartup' via ICcmSystemTask2 interface.
Invoking system task 'CliSrvPreStartup' via ICcmSystemTask2 interface.
Invoking system task 'StatusAgentInitialization' via ICcmSystemTask2 interface.
Invoking system task 'LSPreStartupTask'.
Invoking system task 'ClientRegistrationStartup' via ICcmSystemTask2 interface.
Invoking system task 'TSAgentPreStartup' via ICcmSystemTask2 interface.
Invoking system task 'MtcPreStartup'.
Invoking system task 'StateMessageManagerStartup' via ICcmSystemTask2 interface.
END ExecuteSystemTasks('PreStartup')
BEGIN ExecuteSystemTasks('Startup')
Invoking system task 'ClientIDManagerStartup'.
Invoking system task 'CcmEvalTaskStartup'.
Invoking system task 'EndpointProtectionAgentStartup'.
Invoking system task 'CcmCloudStartup' via ICcmSystemTask2 interface.
Invoking system task 'UserAffinityTaskStartup'.
Invoking system task 'EEAStartup'.
Invoking system task 'StatusAgentStartup' via ICcmSystemTask2 interface.
Invoking system task 'CoMgmt_Startup' via ICcmSystemTask2 interface.
Invoking system task 'M365A_Startup' via ICcmSystemTask2 interface.
Invoking system task 'CertificateMaintenance'.
Invoking system task 'LSMaintenance'.
Successfully raised pending event
Invoking system task 'MtrMgrStartup'.
Invoking system task 'CTMStartup'.
Invoking system task 'CMBITSManagerStartup'.
Invoking system task 'SrcUpdateStartup'.
Invoking system task 'FileBITSStartup'.
Invoking system task 'RebootCoordStartup' via ICcmSystemTask2 interface.
Invoking system task 'SrvWinMgrStartup'.
Invoking system task 'DTSStartup'.
Invoking system task 'ScanAgentStartupTask'.
Invoking system task 'ExecmgrStartup'.
Successfully raised pending event
Invoking system task 'WinPEBranchCacheStartup'.
Invoking system task 'DeltaDownloadServiceStartup'.
Invoking system task 'SensorStartup' via ICcmSystemTask2 interface.
Invoking system task 'SysPerfStartup' via ICcmSystemTask2 interface.
Invoking system task 'CIStore_Startup'.
Invoking system task 'CIStateStore_Startup'.
Invoking system task 'CIDownloader_Startup'.
Invoking system task 'CIAgent_Startup'.
Successfully raised pending event
Successfully raised pending event
Notifying endpoint 'LS_ScheduledCleanup' of __InstanceModificationEvent settings change on object [email protected] for user 'S-1-5-18'.
Successfully raised pending event
Notifying endpoint 'LS_ScheduledCleanup' of __InstanceModificationEvent settings change on object [email protected] for user 'S-1-5-18'.
Successfully raised pending event
Notifying endpoint 'LS_ScheduledCleanup' of __InstanceModificationEvent settings change on object [email protected] for user 'S-1-5-18'.
Invoking system task 'UpdatesDeploymentStartupTask'.
Successfully raised pending event
Invoking system task 'DCMAgent_Startup'.
Invoking system task 'SettingsAgentStartup' via ICcmSystemTask2 interface.
Invoking system task 'SCStartUp' via ICcmSystemTask2 interface.
CSoftwareCenterStartUpTask:: Start Software Center System startup task to launch notification system.
Shortcut already exists CcmExec
Invoking system task 'CertEnrollAgentStartupTask'.
Invoking system task 'SoftwareCatalogUpdateStartupTask'.
Invoking system task 'ComplRelayAgentStartupTask'.
Invoking system task 'BLM_Startup' via ICcmSystemTask2 interface.
Invoking system task 'BgbAgentStartupTask'.
Invoking system task 'PwrAgentStartupTask'.
END ExecuteSystemTasks('Startup')
BEGIN ExecuteSystemTasks('PowerChanged')
Running PostStartup tasks.
SystemTaskProcessor::QueueEvent(PostStartup, 1)
Invoking system task 'PowerStateManager_PowerChanged' via ICcmSystemTask2 interface.
Invoking system task 'PwrMgmtPowerChanged' via ICcmSystemTask2 interface.
END ExecuteSystemTasks('PowerChanged')
BEGIN ExecuteSystemTasks('PowerChangedEx')
Invoking system task 'PwrMgmtPowerChangedEx' via ICcmSystemTask2 interface.
END ExecuteSystemTasks('PowerChangedEx')
BEGIN ExecuteSystemTasks('PowerChanged')
Invoking system task 'PowerStateManager_PowerChanged' via ICcmSystemTask2 interface.
Invoking system task 'PwrMgmtPowerChanged' via ICcmSystemTask2 interface.
END ExecuteSystemTasks('PowerChanged')
BEGIN ExecuteSystemTasks('PowerChangedEx')
Invoking system task 'PwrMgmtPowerChangedEx' via ICcmSystemTask2 interface.
END ExecuteSystemTasks('PowerChangedEx')
BEGIN ExecuteSystemTasks('PowerChanged')
Invoking system task 'PowerStateManager_PowerChanged' via ICcmSystemTask2 interface.
Invoking system task 'PwrMgmtPowerChanged' via ICcmSystemTask2 interface.
END ExecuteSystemTasks('PowerChanged')
BEGIN ExecuteSystemTasks('PowerChangedEx')
Invoking system task 'PwrMgmtPowerChangedEx' via ICcmSystemTask2 interface.
END ExecuteSystemTasks('PowerChangedEx')

Fix The CcmExec.exe service is not automatically restarted

In some cases, the CcmExec.exe service is not automatically restarted after the WMI service is paused and restarted. This problem occurs because WMI cancels all requests when it is paused and does not restart those requests when the service is resumed or restarted. To resolve this issue, you must manually restart the SMS Agent Host service. The periodic client health check will also detect that the SMS Agent Host service isn’t functioning and restart the service when it executes.

Leave a Comment