Monday, October 28, 2013

SCOM Powershell Queries



Recently, I was thrown in a drill where SCOM health needs to be verified.

"What is SCOM": SCOM is a server/client model that monitors the server health. Server heath can be categorized on multiple criteria. These criteria could be written in MP
(management pack) and then the servers are monitored on the basis of these parameters.
It would have been impossible for me to monitor 800+ servers without SCOM powershell commands.

Following are some commands where servers could be categorized in three
different states. The powershell command is also written against each and every category.

  1. # of Servers where SCOM HeartBeat is Healthy get-scomagent | Where-Object {$_.healthstate -eq "success"} | Measure
  2. # of Servers where SCOM Heartbeat has Issues get-scomagent | Where-Object {$_.healthstate -eq "uninitialized"} | Measure
  3. # of Servers which are not healthy in SCOM get-scomagent | Where-Object {$_.healthstate -eq "Error"} | Measure

Please share your feedback which help me improve my articles.

No comments:

Post a Comment