Restart CCMExec only once on 2000 machine with GPO


Hi Experts ,

I want to restart CCMExec service only once on 2000 machine with GPO.

What will be the best way to achieve this ?

Ketan KAmble

Answers ( 2 )


    Hi Ketan,

    as per my understood GPO can’t execute to all machines at the same time.

    It better to use PowerShell script execution remotely by using the below script, or else you can use SCCM Script deployment.

    $computers = Get-Content C:\computers.txt
    ForEach ($computer in $computers)
    Restart-Service -InputObject $(Get-Service -Computer $computer -Name ‘SMS Agent Host’);


      I am thinking of doing it via Endpoint analytics and their Proactive remediation’s …
      Thinking of doing something like this with powershell.

      IgorNeCho44niyroarl off
      If exist “C:\Temp\CCMExec_restart.txt” GOTO END
      net stop CCMEXEC
      timeout 100
      net start CCMEXEC
      timeout 120
      WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000001}” /NOINTERACTIVE
      timeout 50
      WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000021}” /NOINTERACTIVE
      date /T >”C:\Temp\CCMExec_restart.txt”
      time /T >>”C:\Temp\CCMExec_restart.txt”
      EXIT /B %errorcode%

      Best answer

Leave an answer

Sorry, you do not have permission to answer to this question .