Lots of people request this. It is far less efficient than our native service monitor, however it isn't feasible to monitor "all" services on a box using a single service monitor. So a script base solution is the more efficient - the script just needs to output the service name(s) for any unhealthy services, and the script should take a parameter for specific services to not monitor, or have the logic hard coded in the script.
Here is an example: http://blogs.technet.com/b/yasc/archive/2011/10/17/automatic-services-management-pack.aspx From: [email protected] [mailto:[email protected]] On Behalf Of Haysley, Adam Sent: Tuesday, January 20, 2015 1:13 PM To: '[email protected]' Subject: RE: [msmom] win32_service where startmode = 'auto' AND state != 'running' I know how to do the query. I said VBScript because we still have servers that do not have PowerShell installed. Question is: How do I get these alerts in SCOM via VBScript? From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Jorgensen, Erik Sent: Tuesday, January 20, 2015 2:09 PM To: [email protected]<mailto:[email protected]> Subject: RE: [msmom] win32_service where startmode = 'auto' AND state != 'running' I would do it in PowerShell, like this: Get-WMIObject Win32_Service | Where-Object { $_.StartMode -eq 'Auto' -and $_.State -ne 'Running' } Hope that helps, Jorgie -- Erik Jorgensen Support Systems Administrator - Principal Vended Applications Support Services Division of IT University of Missouri - Columbia [email protected]<https://um-ncas2.um.umsystem.edu/owa/UrlBlockedError.aspx> 573.882.5974 Sent from a Surface Pro with Windows 8.1 Enterprise Update! From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Haysley, Adam Sent: Tuesday, January 20, 2015 12:59 PM To: [email protected]<mailto:[email protected]> Subject: [msmom] win32_service where startmode = 'auto' AND state != 'running' I'm sure this has been asked before, but since I am a newbie to SCOM, I will ask again. I have been asked to monitor all services that have a startmode = auto and state != running. Can this be down in a vbscript so to not put the burden on SCOM and increase the repeat count on every execution? Help!!! Thanks! Adam The information contained in this E-mail transmission is intended only for the use of the individual or entity to whom it is addressed. It may contain privileged, confidential, and protected health information. If you received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then please delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person. To do so could violate state and Federal privacy laws. Thank you for your cooperation. Please contact the sender if you need assistance. Dedicated to Hope, Healing and Recovery. The information contained in this E-mail transmission is intended only for the use of the individual or entity to whom it is addressed. It may contain privileged, confidential, and protected health information. If you received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then please delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person. To do so could violate state and Federal privacy laws. Thank you for your cooperation. Please contact the sender if you need assistance. Dedicated to Hope, Healing and Recovery.
