Identify services set to automatic, but not running

I used to configure monitoring of services that were explicitly requested but unfortunately sometimes critical services are missed because people forget how things really work.

I’ll still configure service specific monitoring, but as a catch-all, I’ve integrated additional monitoring to identify windows services configured to start automatically that are in a stopped state. After all, why set a service to auto if’ it’s not supposed to be running right?

Whether you’re running the script local or against a remote server, you can do it.

When I incorporated this into my monitoring application, I had to create two separate metrics. This one will return “ASR” if all is good to go, otherwise, an actual list of services is the output which I insert into email notifications. I had to do this because if all is good to go, there simply isn’t any output which would wreak havoc in my monitoring tool. By the way, ASR is something I came up with just to note “All Services Running”.

As you may have noted, there are some services I’m excluding, you could remove it, add to the exclusion list or whatever you want…make scripting great again.

Leave a Reply