Configuration Dashboard Management Pack Script

SCOM 2012 – Example Agent Health Check Dashboard Using PowerShell Grid Widgets

In this post I would like to show you what the benefit is of having PowerShell integration in dashboards. The days before having the PowerShell widgets you mostly needed to export your PowerShell queries / results into some sort of text file / Excel sheet etc. to display the result. For example a common request is to have a list of grey agents or list all agents that do not have the proxy setting enabled on your monitored agents etc. Because of that I created some sort of health check dashboard which let’s you display common request in one single spot.

The requests I get a lot are:

  1. Display all servers from the domain which do not have a SCOM agent installed
  2. Display all agents which do not have an Active Directory computer account. E.g. this means either there is a server decommissioned but the agent is not deleted in SCOM.
  3. Display all grey agents which the watcher node cannot contact.
  4. Display agents which do not have the proxy setting enabled.

I created a simple grid dashboard with 4 cells…


For the first widget I query the current Active Directory and compare the list of servers / computers returned against the installed agents. This will return the computers which do not have a SCOM agent installed. The second widget does the opposite and compares the installed SCOM agents against the Active Directory computer accounts in the current domain. This means there is something “fishy” because you have a SCOM agent object in SCOM but no corresponding computer object in the current Active Directory. This could be because the server has been decommissioned and the SCOM agent not deleted or it will also show agents from the other domain than you are currently logged in. The third widget shows simply agents which are in a grey state and cannot be contacted by the watcher object anymore. The fourth widget lists all agents that are not proxy enabled.

For querying the Active Directory I am not using any Active Directory cmdlets like Get-ADComputer instead I use the System.DirectoryServices.DirectorySearcher object. This way we do not depend on any cmdlets. These are just samples and are useful for a single domain scenario, if you have multiple domains / forests etc. you need to extend the scripts.

My goal is to show you what can be done, deliver some ideas what can be useful in daily life and how cool the PowerShell widgets are.

You can download the scripts for these PowerShell Grid Widgets here.

5 Replies to “SCOM 2012 – Example Agent Health Check Dashboard Using PowerShell Grid Widgets

  1. Thanks for this great Dashboard. I was looking exactly the same. Could you please provide details (step by steps) how to create those. I created 4 grids. But not sure which widget to use for running power shell there.

  2. Hi,

    I’m trying to run the PSGW-ADComputersWithNoSCOMAgent script.

    I don’t understand this line:

    $adcomputers += $result.Properties.dnshostname

    Is the dnshostname a command? Or should I substitute it with the hostname of our dns server?

    I’m just running the script in ISE at present.


  3. I found out the problem. Run the script as is in SCOM Powershell Grid. It doesn’t run under Powershell/ISE due to missing requirements. Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.