Script to check if all sub services of CAF are running

Document ID : KB000020557
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Certain custom scripts sometimes need to be executed on the agent machines to do certain ITCM related tasks. The successful execution of these scripts depend on the successful start of the CAF sub services. The below script can be included in these scripts to ensure that the CAF services are started before the custom script is executed successfully.

Solution:

  caf status | find /I "are currently stopped" > nul     
  IF ERRORLEVEL 1 EXIT /B 0 
  EXIT /B 1