This sample management pack consist of a widget template to allow configuration and creation of custom Speedometer Gauge widgets from the output of PowerShell scripts via a UI within a dashboard layout in the OpsMgr 2012 Operations Console.


Importing the management pack into an OpsMgr 2012 R2 environment will allow the widget template to appear under the "All Templates/WeiOutThere Speedometer Gauge" folder in the "New Dashboard and Widget Wizard" Page:




To create an instance of this custom Speedometer Gauge widget, first create a dashboard layout (with n-cells), Click to add widget on a cell, then select the Sample Speedometer Gauge Widget template, go through the UI pages of the template and enter the required information.

 

  1. On the “General Properties” page, enter a name for the widget.

  2. On the "PowerShell Script" page, the page is already pre-filled with a sample script that consist of all the key properties that utilizes the ScriptContext helper object ($dataObject = $ScriptContext.CreateFromObject ... ), to control the display on the Speedometer Gauge widget.       

    The following picture shows the mapping between the key properties in the script and the corresponding part on the Speedometer Gauge widget that they control:   


  3. On the “Refresh Interval” page, enter a numerical value for the refresh interval of the widget (in seconds).
    Note that the default refresh interval for the widget is set at 300 seconds (I.e. refreshes every 5 minutes).
      
      
  4. On the “Additional Information” page, enter an additional note for the Speedometer Gauge widget if applicable, or leave it blank. 

  5.  Click the Finish button to create the custom Speedometer Gauge widget.    
 

Alternatively, the $globalSelectedItems variable can also be used to pass context to a Speedometer Gauge Widget.   

 

 



For more information, please visit:
http://blogs.msdn.com/b/wei_out_there_with_system_center/archive/2016/01/13/opsmgr-sample-speedometer-gauge-widget-template.aspx

Silverlight Friendly version:
https://blogs.msdn.microsoft.com/wei_out_there_with_system_center/2016/05/03/opsmgr-sample-silverlight-friendly-speedometer-widget-template-for-the-web-console