Flush SCOM Health Cache Using Orchestrator

There may come a time where a SCOM agent is no longer communicating with its Management Server. Some organizations may allow the monitoring team to log into the server that has the agent communication issues and clear the Health Service State folder. For hardened environments, that may pose to be an issue. Through orchestrator, we can specify an account variable already in place.

Runbook Overview

  1. Initialize Data. – When running the runbook this is where the name of the Agent will be provided.



  2. Stop Health Service – The service will need to be stopped before the folder can be renamed. Under the Security tab, I am using credentials that have the rights necessary to perform the actions against the service.




  3. Rename Health Service Folder – A simple script will run to change the name of the folder. Grab my script here. The script uses variables I have stored in Orchestrator to rename the folder. Change out the SERVERNANE place holders with the Variable for the Computer Name. Also in the script change out the $Username and $Password with the variables of the account that is used for the connection. As a recommended practice the password variable should be encrypted.



  4. Start Health Service – This will restart the service and create a new folder automatically.






Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s