Powershell Grid Widget with Filter

The Powershell Grid Widget introduced since UR2 for System Center 2012 R2 Operations Manager opens wide open the possibilities of what can be covered by Operations Manager Dashboards.

I was very excited by this particular widget and I started using it. If the same applies to you, then perhaps it was not long before you noticed a short-coming of its implementation that frustrates in case of relative large output data provided by the Powershell data source (the script).
In such situations, a Filter control (like for instance the one that is part of the State widget) would be much appreciated.

I was not able to find such solution (not for lack of trying) therefore I decided to create one myself and the end result was the library MP that I uploaded to TechNet Gallery (https://gallery.technet.microsoft.com/Powershell-Grid-Widget-919dc3d6).

This library management pack adds the PowerShell Grid Widget (Filtered) that allows the user now to create PowerShell Grid dashboards, using the template driven wizard. The usage and configuration of the new widget is the same as the Powershell Grid Widget, just that the output is now searchable (can be filtered). Cool!


Just import the Management Pack and start using the new widget in your dashboard visualizations.

I am providing below an example of the usage.

I often felt a need to perform fast, yet organized, searches against SCOM. Here is what I want to ask SCOM from my dashboard: start by telling me all the classes that you’re aware, let me select one class (or even maybe several classes) then tell me the instances of that class that you have discovered.
Then let me search for an instance and when I select it, let me know the details of the instance, the health and all alerts related.

Steps to create such dashboard:

1. Create a Grid Layout dashboard with 5 Cells, name it “Bing SCOM”, for fun…

2. Add the first widget using “Powershell Grid Widget (Filtered)”, name it Search Class, and enter the following script:

$classes = Get-SCOMClass

foreach ($class in $classes)
	$dataObject = $ScriptContext.CreateInstance("xsd://foo!bar/baz")

3. Add the second widget using “Powershell Grid Widget (Filtered)”, name it Search Instance, and enter the following script:


foreach ($globalSelectedItem in $globalSelectedItems)
	$class = Get-SCOMClass -Id $globalSelectedItem["Id"]
	$instances = Get-SCOMClassInstance -class $class
	foreach ($instance in $instances)
		$dataObject = $ScriptContext.CreateFromObject($instance, "Id=Id,State=HealthState,DisplayName=DisplayName,Path=Path", $null)
		$dataObject["ParentRelatedObject"] = $class.DisplayName

4. Add the third widget using Details Widget.

5. Add the fourth widget using the Contextual Health Widget.

6. Add the fifth widget using the Contextual Alert Widget.

Here is a screenshot of the end result.


Enjoy your SCOM searches now!


One response to “Powershell Grid Widget with Filter

  1. Pingback: AddOn DFS Replication Management Pack (part #2 – featured monitoring) | stelianposteablog

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 )

Google+ photo

You are commenting using your Google+ 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

%d bloggers like this: