How to Create a Squared Up Visio Dashboard for an Existing Distributed Application

Written by Tao Yang


OK, it has been over a month since my last blog post. Not that I’ve been lazy, I’ve actually been crazily busy. As you may know, I’ve started working for Squared Up after Ignite. So, this is another blog about Squared Up – this time, I’ll touch base on the Visio dashboard.

If you haven’t heard or played with Squared Up’s Visio Dashboard plug-in, you can find a good demo by Squared Up’s founder, Richard Benwell in one of Microsoft Ingite’s SCOM Sessions here:

If you already have a Visio diagram for your application (that’s been monitored by OpsMgr), it is really quick and easy to import it into Squared Up as a dashboard (as Richard demonstrated in the Ignite session). However, what if you don’t have Visio diagrams for aparticular application you want to create dashboard for (i.e. an Off-The-Shelve application such as AD, ConfigMgr, etc.)? If this is the case, you can manually create the Visio diagram – and hopefully you are able to find the relevant stencils for your applications. But, this can take a lot of time. If you are like me, who really hate drawing Visio diagrams, you probably won’t enjoy this process too much.

In this post, I’ll show you how to quickly produce a Visio dashboard in Squared Up for an existing application that’s been monitored by SCOM. I’ll use the Windows Azure Pack Distributed Application from the community WAP management pack as an example (developed by Oskar Landman from Inovativ:


01. In OpsMgr console, open the diagram view for the DA of your choice and export it to a Visio .vdx file:


Click OK if you get a message warning you there are too many objects included in this DA:


By default, the diagram view will only show the top level objects. However, you can keep drilling down the diagram, until you get a desired diagram (that you wish to display in Squared Up). In this demo, I will just use the diagram with top level objects:


As shown above, click the export button to export this diagram to a Visio diagram (.vdx) file.

02. Preparing the Visio diagram (.vsdx) from the .vdx file:

When you open the .vdx file, and zoom in, it looks exactly the same as the OpsMgr diagram view:


Firstly, you will need to remove the health state icons (the green ticks and red crosses in this case). A .vdx file is read-only in Visio, so after the icons have been removed, Save it as a .vsdx file. The .vsdx file looks like this now:


Now, we need to import SCOM monitoring objects data into this Visio diagram. Squared Up has written a good user guide on how to generate an Excel spreadsheet for the monitoring object information from Squared Up console. You can find this article here:

However, by using the Squared Up console as mentioned above, you have to manually  lookup every single monitoring object that is displayed in the Visio diagram. This can be very time consuming if you have a lot of objects in your diagram. In order to simplify this process, I have created a PowerShell script called Export-DAMembers.ps1 to get the information for members of a Distributed Application, and export the data to a CSV file.

You can download this script from HERE.

Note: This script does not require the native OpsMgr PowerShell module to run, however, it does require the OpsMgr 2012 SDK assemblies. If you are running it on an OpsMgr management server, web console server, or a computer that has the operational console installed, you don’t need to do anything else, you can just run this script straightaway. But if you are running this script on a computer that does not meet any of these requirements, you will need to copy the 3 OpsMgr 2012 SDK DLLs to the same folder of where the script is located. these 3 DLLs are:

  • Microsoft.EnterpriseManagement.Core.dll
  • Microsoft.EnterpriseManagement.OperationsManager.dll
  • Microsoft.EnterpriseManagement.Runtime.dll


You can find them on a management server, located at <OpsMgr install directory>\Server\SDK Binaries

I have included a help section for the script, as well as all the functions in the script, so I won’t go through how to use it here. you can simply open the script in a text editor and read it if you like:


In order to export the information we need for the Visio dashboard, we only need the Display Name and the Monitoring Object Id. I’m running the script with the following parameters:

.\Export-DAMembers.ps1 -SDK “<SCOM Management Server Name>” -DADisplayName “Windows Azure Pack” -ExportProperties (“DisplayName”, “Id”) -Path C:\Temp\DAExport1.csv –verbose


Note: As you can see, because I’m only going to display the top level objects in the dashboard, so I did not have to use recursive lookup, therefore, only 6 objects returned. If I run the script again with “-recursive $true” parameter, it will return all objects that are member of the DA (143 in total):


The total number matches the previous warning message in the OpsMgr diagram view:


Once the CSV is exported, open it in Excel:


In order for Squared Up to understand the data, we will need to change the title for both columns:

  • Change DisplayName to ScomName
  • Change Id to ScomId


Now, save it as an Excel Spreadsheet (.xlsx file).

We can now import the data from the Excel spreadsheet into the Visio diagram. The guide from Squared Up’s site has documented it very well, I won’t go through it again here.

After I’ve mapped the data for each object in the Visio diagram, it looks like this:


I’ve then hidden the data in Visio, exported it as a .SVG file, and produced a Visio dashboard in Squared Up using the SVG file. The final piece looks like this:


Which is very similar to the diagram view in OpsMgr console:



If you already have Squared Up in your environment, I hope you find this blog post useful. As I demonstrated, it is really easy to create a Squared Up dashboard for your existing Distributed Applications – and I’ve already done the hard work for you (creating the script for looking up monitoring object IDs).

As we all know, Squared Up is based on HTML 5 and it’s cross platform, You can use it on browsers other than IE, as well as mobile devices such as an Android tablet. The picture below is my Lenovo Yoga Tab 2 Android tablet displaying this Squared Up WAP dashboard I’ve just created Smile


New MP: OpsMgr Health State Synchronization Library

Written by Tao Yang

Health SyncBackground

As I mentioned in previous blog posts, I will continue blogging on the topic of managing multiple OpsMgr management groups – a topic keeps getting brought up in the private conversations between us SCCDM MVPs.

Previously, I have written 2 posts demonstrated how to use Squared Up dashboard to access data from foreign management groups using their SQL and Iframe plugins. Now that I’ve covered the presentation layer (using Squared Up), I’d like to explore deeper in this subject.

I wanted to be able to synchronise the health state from a monitoring object managed by a remote management group into the local management group so it can be part of the health models users are building (i.e. be part of a Distributed Application, or simply a dashboard). I had this idea in my head for awhile now, over the last month or so, I finally managed to produce such a management pack that enables OpsMgr users to do so.


It is common to have multiple OpsMgr management groups in large organisations. When designing distributed application or creating custom dashboards, one of the limitations is that OpsMgr users can only select monitoring objects within the local management group to be a part of the Health Model. This becomes an issue when users want to design a Distributed Application or dashboard that include components monitored by different OpsMgr management groups.

The OpsMgr Health Synchronization Library management pack is designed to provide a workaround to this limitation. This management pack provides a template that enables OpsMgr users to create monitoring objects named “Health State Watcher” hosted by All Management Servers Resource Pool. Health State Watcher objects have monitors configured to query health state of monitoring objects located in a remote management group using OpsMgr SDK.


As shown in the diagram above, an instance of Health State Watcher can be created for each monitoring object of user’s choice from a remote management group. Each Health State Watcher object will periodically update its own health state based on the health state of the remote monitoring object it is watching for (every 5 minutes by default). As shown above, the Health State Watcher can query health state of any monitoring objects from remote management group (i.e. a Windows Computer object, a Distributed Application or any other types monitoring objects).

This management pack provides 4 unit monitors to the Health State Watcher class. They are used to query the health state of the Availability, Configuration, Performance and Security aggregate monitors of the remote monitoring object respectively.

Once the Health State Watcher objects are created and correctly configured, it can be used to display the health state of the remote monitoring object in a dashboard or distributed application hosted by the local management group.

How Do I Use this MP?

This management pack provides a management pack template for OpsMgr users to create the Health State Watcher instances from the OpsMgr operations console.


The following information must be provided when creating an instance using the management pack template:

  • Display Name
  • Description (Optional)
  • Unsealed Management Pack (where the MP elements will be saved)
  • One of the management servers from the remote management group
  • Monitoring Object ID of the monitoring object from the remote management group
  • Run-As account for SDK connection to the remote management group

Please follow the steps listed below to create a template instance.

1. Click the “Add Monitoring Wizard” from the Authoring pane under “Management Pack Template”


2. Choose “Cross Management Group Health State Monitoring” from the list


3. In General Property page, enter the display name, description and select an unsealed MP from the drop-down list:


4. In the Parameter Configuration Page, enter the following information:


  • Management server from the remote management group
  • Source Instance ID (monitoring object ID) of the monitoring object from the remote management group

Note: there are multiple ways to find the monitoring object ID in OpsMgr. Please refer to this article for possible ways to locate the ID:

  • Select the Run-As account that was created prior to running this wizard.

Note: The Run-As account must meet the following requirements:

    1. It must have at least Operator access in the remote management group
    2. It must be distributed to all management servers


    1. It must have logon locally access on all management servers. – This is a general requirement for all Windows Run-As accounts in OpsMgr. Although it will never be used to logon locally on the management servers, without this right, the workflows that are using this Run-As account will not work.


5. Confirm all information is correct in the Summary page, and click on “Create”.


6. After few minutes, the health state of the Health State Watcher instance should be synchronized from the remote monitoring object:

Overall state:


Health Explorer:


Source monitoring object (from remote MG):


Sample Distributed Application

The diagram below demonstrates how to utilize the health state watcher in a Distributed Application:


In the demo environment, the 2 domain controllers (AD01 and AD02) are being monitored by a management group located in the On-Prem network. There is another domain controller located in Microsoft Azure IaaS, and it is being monitored by a separate management group in Azure. A Health State Watcher object was created previously to synchronize the health state of the Azure DC Windows computer health.

Sample Dashboard (Using Squared Up)


As shown above, on the left section, the Health State Watcher object for the Azure based domain controller is pinned on the correct location of a World Map dashboard. The health state of individual domain controllers are also listed on the right.


The workflows in this MP are actually pretty simple, but it has taken me A LOT of time to finish this MP. This is largely caused by the template UI interfaces. Unfortunately, I couldn’t find any official guides on how to build template UIs using C#. I’d like to thank my friend and fellow SCCDM MVP Daniele Grandini (blog, twitter) for testing and helping me debugging this MP when I hit the road block with the template UI interface.

Where can I download this management pack?

As I mentioned in my previous post, from now on, any new tools such as management packs, modules, scripts etc. will be released under TY Consulting and download links will be provided from it’s website

You can download this MP for free from, however, to help me promote and grow my business, I am asking you to provide your name, email and company name in a form and the download link will be emailed to you by the system.

Lastly, as always, any feedbacks are welcome. Please feel free to drop me an email if you have anything to share.

Next Step in My Career

Written by Tao Yang


Full Logo Raw Long White Background

Back in September 2011, after a short and unpleasant contracting experience, I joint a large Australian retailer as a senior systems engineer, focusing on their System Center infrastructure. I chose this company because the office location is close to home, the role was interesting (have a VERY large System Center environment to play with), and my wife and I were expecting a baby so I thought a permanent role suited me better. Now looking back the 3.5 years I have spent there, I have involved in multiple System Center implementation and upgrade projects, written countless amount of management packs, trained many of my colleagues in various System Center products, and most importantly, continued blogging on this blog and earned my System Center Cloud and Datacenter Management MVP title.

Like all good things come to an end, I have realised it is time for me to move on and I have tendered my resignation 2 weeks ago. My last day as a full time employee there is Friday 1st of May 2015.

Last year, shortly after I became a MVP, I attempted to partner with another MVP to start a company called Sparq Consulting. Unfortunately, Sparq never took off and worked out for me. Until this date, it is still nothing but a verbal agreement. I have no legal obligation nor signed any contracts with Sparq. Therefore, I have decided to separate from Sparq and become an independent / freelance consultant.

After meeting with my accountant, I was told I need to register a company. As I am very bad with names, my wife suggested me to just use my initials as company name. Therefore, I named my company TY Consulting.

Moving forward, I am still going to keep blogging on this blog, but in order to help myself promoting TY Consulting, any new tools such as management packs, modules, scripts etc. will be released under TY Consulting and download links will be provided from it’s website Over the last month or so, I’ve been working on an OpsMgr management pack that enables OpsMgr users to synchronise the health state from a monitoring object managed by a remote management group. I have already released this management pack on, I will write about it in the next blog post shortly after this.

Lastly, and most importantly, for all the folks out there in the broader System Center community, please DO contact me when you are looking for System Center consultants, I am now open for business!

2015 Global Azure Bootcamp – Melbourne Event

Written by Tao Yang
2015 Azure BootCamp

For those who are actively engaged in Microsoft System Center and Azure community may already aware that there is a global Azure Bootcamp event taking place later this month (April 2015).

This year, the Azure bootcamp is going to be held at 195 confirmed locations on Saturday 25th April. More information about this global event can be found here:

My fellow SCCDM MVP Daniel Mar is the organizer for the Melbourne event. Daniel has already put a great effort in organising this event (BIG thank-you to Daniel), and we now have a great line-up for Melbourne – with totally 11 MVPs presenting:

  • James Bannan – Enterprise Client Management
  • David O’Brien – System Center Cloud and Datacenter Management
  • Orin Thomas – Consumer Security
  • Tao Yang – System Center Cloud and Datacenter Management
  • Dan Kregor – System Center Cloud and Datacenter Management
  • Daniel Mar – System Center Cloud and Datacenter Management
  • Mahesh Krishnan – Microsoft Azure
  • Mitch Denny – Visual Studio ALM
  • John Azariah – Microsoft Azure
  • Yaniv Rodesnki – Microsoft Azure
  • Bill Chesnut – Microsoft Integration

This event is going to be held at Saxons Training Facilities located in Melbourne CBD (Level 8, 500 Collins Street, Melbourne), and all 4 Australia based System Center Cloud and Datacenter Management MVPs (David, Daniel, Dan and myself), as well as some other big names in System Center and IT Pro community such as Orin Thomas and James Bannan will be presenting in this event. Smile

Please checkout the event site for sessions details. This is a free event, please register if you’d like to attend. (please note the available spots are limited, so, please only register if you are certain that you will be attending),

Lastly, we acknowledged 25th April 2015 is the 100th anniversary of the ANZAC day. In order to respect the Australian and New Zealand soldiers, we have looked at the possibilities of changing the event day for Melbourne, but unfortunately, given it is a part of a global event, we are unable to do so. However, we will show respect to the fallen soldiers by reciting Ode of Remembrance and play the Last Post.

Consolidate Multiple Squared Up Instances into Single Dashboard

Written by Tao Yang

Recently, I have been involved in many conversations in regards to managing multiple SCOM management groups with other SCCDM MVP colleagues. I am planning to write more on this topic in the future. 2 weeks ago, after I posted using Squared Up as an universal dashboard and demonstrated how to list active alerts from another management group using their SQL plugin, my friends at Squared Up hinted me that I can also use the Iframe plugin for this purpose. Therefore, today, I’d like to demonstrate how can we present information from multiple management group (multiple Squared Up instances) into a single Squared Up page / dashboard using their Iframe plugin.

The Iframe plugin allows to you display an embedded page within a dashboard. In my lab, I have 2 SCOM management groups, one located in my home lab and another one is hosted in Azure. I have installed Squared Up on the web console server of each MG. Today, I managed to produce 2 dashboards in one of my Squared Up instances:

Alerts from Multiple MGs:


Servers from Multiple MGs:


Each section (left and right) uses an instance of Iframe plugin to display a particular web page from a Squared Up instance. The setup is relatively easy. I’ll go through how to setup them now.

01. Configure the page you want to display the way you like. i.e. for the alert page, using the options to customise however you want it to be.


02. save the changes and copy the URL.

03. Create a new page, split into multiple sections, and in one of the sections, choose “Web Content”, and copy the URL in the src field



03. As shown above, add ?embed=true at the end of the URL (to remove the header), and add 2 additional parameters (refresh = true, scrolling = true).

04. Repeat above steps in other sections.

For the server list dashboard, you can drill down by clicking on a server, and then you will be able to trigger agent tasks associated to that particular server:


So, why am I using Squared Up to consolidate views instead of configuring a Connected MGs scenario? Connected MGs have its limitations such as:

  • both management groups must be running the same version.
  • both management groups must be located in the same domain or trusted domains. untrusted domains are not supported

More information about Connected MG can be found here:

By using the Iframe Plugin, you simply consolidate the views into a single page, therefore the limitations for connected MGs listed above don’t apply here.

This is what I have to share today. As I mentioned in the beginning of this article, there will be more on managing multiple management groups in the future. so stay tuned Smile.

Using Squared Up As an Universal Dashboard Solution

Written by Tao Yang


I’ve been playing with Squared Up a lot lately – to get myself familiar with the new 2.0 version, thus my recent few posts were all related to it.

few days ago, I was involved in a conversation around from SCOM users / consumers point view, how to bring data from multiple management groups into a single pane of glass. As the result of this conversation, I’ve spent some time and tried the Squared Up SQL Plugin. After couple of hours, I managed to produce 2 dashboards using this plugin, both using data sources that are foreign to the OpsMgr management group the Squared Up instance is connected to.

In this blog, I’ll go through the steps setting up the following dashboards:

  • Active Alerts from another OpsMgr management group (data source: the OperationsManager DB from the other management group).
  • ConfigMgr 2012 Package Distribution Dashboard (data source: ConfigMgr primary site DB).


I will demonstrate using the Squared Up 2.0 dashboard installed on the OpsMgr web console server in my home lab.

The foreign OpsMgr management group is hosted in my Azure subscription. All the servers used by this management group are connected to my home lab via a Azure S2S VPN connection. They are located on the same domain as my on-prem lab.

The ConfigMgr infrastructure is also located in my home lab (on-prem).


Setting up DB access in SQL

Since the SQL connection string used by this plugin is stored in clear text, SquaredUp does not recommend using a username and password. Therefore, in the connection string, I’m using integrated security.

Since the SquaredUp IIS Application pool is running using the local NetworkService account, I must grant the SquaredUp web server’s computer account datareader access to the database that’s going to be used as the data source. i.e. for my ConfigMgr primary site DB:


and for the OpsMgr operational DB:


Installing Squared Up SQL Plugin

You will need to install the latest version (2.0.2) of the plugin. if you have already installed it before, please make sure you update to this version. There was a bug in the earlier versions, and it has been fixed in 2.0.2.


ConfigMgr Package Distribution Dashboard


This dashboard contains 3 parts (two parts on the top, one on the bottom). the top 2 parts displays the a single number (how many package distributions are in error and retrying states). the bottom part is a list for all the distributions that are in these 2 states.

All 3 parts are using the SQL plugin, the connection string for all 3 parts are:

Data Source=<ConfigMgr DB Server>;Initial Catalog=<ConfigMgr Site DB>;Integrated Security=True;

the top 2 parts are configured like this:


Pkg Dist – Error State part (Top left):

SQL query string:

SELECT Count([StateGroupName]) FROM v_ContentDistributionReport where StateGroupName = ‘Error’

Pkg Dist – Retrying State part (Top right):

SQL query string:

SELECT Count([StateGroupName]) FROM v_ContentDistributionReport where StateGroupName = ‘Retrying’

Other parameters:

isscalar: true

scalarfontsize: 120

Pkg Dist – List (Bottom):


SQL query string:

SELECT [PkgID],[DistributionPoint],[State],[StateName],[StateGroupName],[SourceVersion],[SiteCode],Convert(VARCHAR(24),[SummaryDate],113) as ‘Summary Date’,[PackageType] FROM v_ContentDistributionReport where StateGroupName <> ‘Success’ order by StateGroupName desc

other parameters:

isscalar: false


Active Alerts Dashboard for a foreign OpsMgr MG


Similar to the previous sample, there are 2 parts on the top displaying scalar values. In this case, I’ve chosen to display the active alerts count for critical and warning alerts. Followed by the 2 big scalar numbers, I added 2 lists for active critical & warning alerts.

SQL connection strings:

Data Source=<OpsMgr DB server>;Initial Catalog=OperationsManager;Integrated Security=True;

Active Alert Count – Critical (Top left):

SQL query string:

select count(id) from [dbo].[AlertView] where ResolutionState <> 255 and severity = 2

isscalar: true

scalarfontsize: 120

Active Alert Count – Warning (Top right):

SQL query string:

select count(id) from [dbo].[AlertView] where ResolutionState <> 255 and severity = 1

isscalar: true

scalarfontsize: 120

Active Alerts – Critical (list):

SQL query string:

SELECT Case a.[MonitoringObjectHealthState] When 0 Then ‘Not Monitored’ When 1 Then ‘Healthy’ When 2 Then ‘Warning’ When 3 Then ‘Critical’ END As ‘Health State’, a.[MonitoringObjectFullName] as ‘Monitoring Object’,a.[AlertStringName] as ‘Alert Title’,r.ResolutionStateName as ‘Resolution State’,Case a.Severity When 0 Then ‘Information’ When 1 Then ‘Warning’ When 2 Then ‘Critical’ END As ‘Alert Severity’, Case a.Priority When 0 Then ‘Low’ When 1 Then ‘Medium’ When 2 Then ‘High’ END As ‘Alert Priority’,Convert(VARCHAR(24),a.[TimeRaised],113) as ‘Time Raised UTC’ FROM [dbo].[AlertView] a inner join dbo.ResolutionStateView r on a.ResolutionState = r.ResolutionState where a.ResolutionState <> 255 and a.severity = 2 order by a.TimeRaised desc

isscalar: false

tableshowheaders: true

Active Alerts – Warning (list):

SQL query string:

SELECT Case a.[MonitoringObjectHealthState] When 0 Then ‘Not Monitored’ When 1 Then ‘Healthy’ When 2 Then ‘Warning’ When 3 Then ‘Critical’ END As ‘Health State’, a.[MonitoringObjectFullName] as ‘Monitoring Object’,a.[AlertStringName] as ‘Alert Title’,r.ResolutionStateName as ‘Resolution State’,Case a.Severity When 0 Then ‘Information’ When 1 Then ‘Warning’ When 2 Then ‘Critical’ END As ‘Alert Severity’, Case a.Priority When 0 Then ‘Low’ When 1 Then ‘Medium’ When 2 Then ‘High’ END As ‘Alert Priority’,Convert(VARCHAR(24),a.[TimeRaised],113) as ‘Time Raised UTC’ FROM [dbo].[AlertView] a inner join dbo.ResolutionStateView r on a.ResolutionState = r.ResolutionState where a.ResolutionState <> 255 and a.severity = 1 order by a.TimeRaised desc

isscalar: false

tableshowheaders: true

As shown in the dashboard screenshot above, currently I have 9 critical and 12 warning alerts in the MG on the cloud, this figure matches what’s showing in the Operations console:




By using the Squared Up SQL plugin, you can potentially turn Squared UP into a dashboard for any systems (not just OpsMgr). The limit is your imagination Smile. I have also written few posts on Squared Up before, you can find them here:

Lastly, I encourage you to share your brilliant ideas with the rest of us, and I will for sure keep posting on this topic if I come up with something cool in the future.

Accessing OpsMgr Performance Data in Squared Up Dashboard

Written by Tao Yang


13/03/2015 Update: Correction after feedback from Squared Up, Squared Up does not read perf data from Operational DB. Thus this post is updated with the correct information.

Yesterday, my friend and fellow SCCDM MVP Cameron Fuller has posted a good article explaining the differences between performance view and performance widget in OpsMgr. If you haven’t read it, please read it first from here: World War Widget: The performance view vs the performance widget and come back to this article.

As Cameron explained, performance views read data from the operational DB and you can access the most recent short term data. The performance widgets read data from the Data Warehouse DB and you are able to access the long term historical data this way.

I’d also like to throw a 3rd option into the mix, however, this is not something native in OpsMgr, but it is via the 3rd party dashboard Squared Up.

To be honest, Access Performance data must be my most favourite feature in Squared Up. In this post, I will show off few features related to this topic in the Squared Up console.

01. Automatically Switch Between Data Sets

Since all performance collection rules write performance data into both databases, Squared Up only reads performance data from Data Warehouse DB. When accessing the performance data in Squared Up, as long as you have already established Data Warehouse DB connection, Squared Up will automatically detect the best aggregation set for the performance data. You can access both long term and short term data from a single view:


As shown above, the default period is 12 hours, the data displayed is the raw performance data (not aggregated), if I change the period to last 30 days, notice the performance counter name is also updated with “(hourly)” at the end – this means this graph is now based on the hourly aggregate dataset:


If I change the period again, this time, I select “all”, as shown below, it is showing about a year’s worth of data, and it has automatically switched to the daily aggregate dataset:


02. Accessing the numeric value from the graph

Other than being able to auto detect and switch to the more appropriate data source and data set, if you move the cursor to any point on the graph, you will be able to read the exact figure at that point of time:


03. Selecting a Period from the graph:

You can also highlight a period from the graph, and Squared Up will update the graph to only display the period you’ve just highlighted:



04. Exporting Performance Data to Excel

You can also export the data to Excel using the export button on the top right hand side of the page.


When you open the exported Excel document, you’ll see 2 tabs – one for the numeric data on a table, one for the graph itself:





This is all based on my own experience, just my 2 cents on the topic that Cameron has started. I think it would be good to also show the community what a 3rd party product can do in addition to the native capabilities.

If you haven’t played with Squared Up before, I strongly recommend you to go take a look:, you can access the online demo from their website too. They also have few demo videos that you can watch:

Lastly, please feel free to drop me an email if you want to carry on this discussion.

Various Ways to Find the ID of a Monitoring Object in OpsMgr

Written by Tao Yang

Often when working in OpsMgr, we need to find the ID of a monitoring object. For example, in the recent Squared Up Dashboard  version 2.0 Customer Preview webinar (, it was mentioned in the webinar that the monitoring object IDs must  be located when preparing the Visio diagram for the upcoming Visio plugin.

In this post, I’ll demonstrate 3 methods to retrieve the monitoring object ID from SCOM. These 3 methods are:

  • Using OpsMgr built-in PowerShell Module “OperationsManager”
  • Using OpsMgr SDK via Windows PowerShell
  • Using SCSM Entity Explorer

In the demonstrations, I will show how to retrieve the monitoring object ID for a particular SQL database:

  • Monitoring Class Display Name: SQL Database
  • DB name: master
  • SQL Server:


Note: Before I start digging into this topic, if you are not very PowerShell savvy, and only want a simple GUI based solution, please go straight to the last method (using SCSM Entity Explorer).


Using OpsMgr PowerShell Module OperationsManager

01. Define variables and connect to the management server:

02. Get the monitoring class based on its display name:

However, in my management group, there are 2 classes with the same name “SQL Database”:


As you can see, the first item in the array $MonitoringClasses is the correct one in this case. We will reference it as $MonitoringClasses[0].

03. Get the monitoring object for the particular database:

The Get-SCOMClassInstance cmdlet does not take any criteria, therefore, the command above retrieves all instances of the SQL Database class, then filter the result based on the database name, SQL server name and SQL DB instance name to locate the particlar database that we are looking for.


The monitoring object ID is highlighted as above.


The type for the ID field is Guid. You can also convert it to a string as shown above.


Using OpsMgrSDK Via Windows PowerShell

In this example, I won’t spend too much time on how to load the SDK assemblies, in the script, I’m assuming the SDK DLLs are already loaded into the Global Assembly Cache (GAC). So, in order to use this script, you will need to run this on an OpsMgr management server or a web console server, or a computer that has operations console installed.

01. Define variables, load SDK assemblies and connect to OpsMgr management group:

02. Get the monitoring class based on the display name


As you can see, since the display name is not unique, 2 classes are returned from the search (this is same as the first method), except this time, the type for $MonitoringClass varible is a ReadOnlyCollection. However, we can still reference the correct monitoring class using $MonitoringClass[0]


03. Get the monitoring object for the particular database:

Please refer to this page for the properties that you can use to build the search criteria (MonitoringObjectGenericCriteria)

As you can see, unlike the first method using the built-in module, we can specify a more granular search criteria to locate the monitoring object (as result, the command execution should be much faster). However, please keep in mind although there is only one monitoring object returned from the search result, the $MonitoirngObject variable is still a ReadOnlyCollection:


And you can access the particular SQL Database (Monitoring Object) using $MonitoringObject[0]:



Using SCSM Entity Explorer

SCSM Entity Explorer is a free utility developed by Dieter Gasser. You can download it from TechNet Gallery:

Although as the name suggested, it was developed for SCSM, it also works with OpsMgr. Once you’ve downloaded it and placed on a computer, you can follow the instruction below to locate the particular monitoring object.

01. Connect to an OpsMgr management server and search the monitoring class using display name


As shown above, there are 2 classes returned when searching the display name “SQL Database”. You can find the correct one from the full name on the right.

02. Load objects for the monitoring class:

Go to the objects class and click on “Load Objects” button to load all instances.


Unfortunately, the we cannot modify what properties to be displayed on the objects list, and the display name does not contain the SQL server and DB instance name. In this scenario, the only way to find the correct instance is to open each one using the “View Details” button.


Once you’ve located the correct instance, the monitoring object ID is displayed on the objects list.

Having said that, if you are looking for a monitoring object from a singleton class (where there can only be 1 instance in the MG, such as a group), this method is probably the easiest out of all 3.

i.e. When I’m looking for a group I created for the Hyper-V servers and their health service watchers, there is only instance:


Also, for certain monitoring objects (such as Windows Server), you can easily locate the correct instance based on the display name:



based on your requirements (and the information available for search), you can choose one of these methods whichever you think it’s the best.

Lastly,  if you know other ways to locate monitoring object ID, please leave a note here or send me an email.

PowerShell Script to Extract CMDB Data From System Center Service Manager Using SDK

Written by Tao Yang


In my previous post Writing PowerShell Module That Interact With Various SDK Assemblies, I’ve explained how to create a PowerShell module that embeds various SDK DLLs and I’ve used System Center Service Manager SDK as an example. Well, the reason that I created the module for Service Manager SDK is because I needed to write a script to extract CMDB data from Service Manager. In this post, I’ll go through what’ I’ve done and the script can also be downloaded at the end of the article.

So, I needed to write a script to export configuration items from Service Manager, I have the following requirements:

  • The script must be generic and extendable to be able to extract instances of any CI classes.
  • The properties (to be exported) of each class should also be configurable.
  • Supports delta export (Only export what’s changed since last execution).
  • Be able to also export CI Relationships
  • Be able to filter unwanted relationships (from being exported).

After evaluating different options, I have decided to directly interact with Service Manager SDK in the script instead of using the native Service Manager PowerShell module and the community based module SMLets.


As I just mentioned, this script requires the SMSDK module I have created previously (you will have to locate the SDK DLLs from your Service Manager management server and copy them to the module folder as I explained in the previous post).


In order to make the script generic while being extendable, I’ve used a XML file to define various configurations for the script:


I have added a lot of comments in this XML file so it should be very self-explanatory. Just few notes here:

  • This XML configuration file must be placed in the same folder as the script.
  • For each property that you wish to be exported from Service manager, list them under <Properties><PropertyName> tag.
  • This script also exports the relationships associated with each CI object that is exported. However, only the relationships where the exported CI object is the source object are exported.
  • Both <PropertyName> and <CIClassName> are the internal names, Please do not use the display names.
  • You can use the SCSM Entity Explorer (Free download from TechNet Gallery) to identify what are the internal names for the class and property that you wish to export.




Since I have written a lot of scripts using OpsMgr SDK in the past, I didn’t find Service Manager SDK too hard (although this is only the second time I’ve written scripts for Service Manager). The script itself is fairly simple and short:


To execute the script, simply pass the service management server name (user name and password are optional), and you can also use -verbose if you’d like to see verbose messages:

.\SMConfigItemExtract.ps1 -ManagementServer SCSMMS01 -verbose


This script will create a separate CSV file for each CI class that’s configured in the XML. It will also create a single CSV file for ALL relationships export:



The script also writes the execution time stamp to the config.xml under <LastSyncFileDateUTC>. When the script runs next time, it will retrieve this value and only export the configuration items that have been changed after this time stamp. If you need to force a full sync, please manually remove the value in this tag:



You can download the prerequisite SMSDK PowerShell module HERE.

You can download the script and the config.xml file HERE.

My Experience of Using Silect MP Studio During Management Pack Update Process

Written by Tao Yang

Thanks to Silect’s generosity, I have been given a NFR (Not For Resell) license for the MP Studio to be used in my lab last November. When I received the license, I created a VM and installed it in my lab straightaway.  However, due to my workloads and other commitments, I haven’t been able to spend too much time exploring this product. In the mean time, I’ve been trying to get all the past and current MS management packs ready so I can load them into MP Studio to build my repository.

Today, one of my colleagues came to me seeking help on an error logged in the Operations Manager log on all our DPM 2012 R2 servers (where SQL is locally installed):


It’s obvious the offending script(GetSQL2012SPNState.vbs) is from the SQL 2012 MP, and we can tell the error is that the computer FQDN where WMI is trying to connect to is incorrect. In the pixelated area, the FQDN contains the NetBIOS computer name plus 2 domain names from the same forest.

I knew the SQL MP in our production environment is 2 version behind (Currently on version, so I wanted to find out if the latest one ( has fixed this issue.

Therefore, as I always do, I firstly went through the change logs in the MP guide. The only thing I can find that might be related to SPN monitoring is this line:

SPN monitor now has overridable ‘search scope’ which allows the end user to choose between LDAP and Global Catalog


I’m not really sure if the new MP is going to fix the issue, and no, I don’t have time to unseal and read the raw XML code to figure it out because this version of the SQL 2012 monitoring MP has 49,723 lines of code!

At this stage, I thought MP Studio might be able to help (by comparing 2 MPs). So I remoted back to my home lab and quickly loaded all versions of SQL MP that I have into MP Studio.


I then chose to compare version (the latest version) with version (the version loaded in my production environment):


It took MP Studio few seconds to generate the comparison result, and I was surprised how many items have been updated!


Unfortunately, there is no search function in the comparison result window, but fortunately, I am able to export the result to Excel. When I exported to Excel, there are 655 rows! when I searched the script name mentioned in the Error log (GetSQL2012SPNState.vbs), I found the script was actually updated:


Because the script is too long and it’s truncated in the Excel spreadsheet, I had to go back to MP Studio and find this entry (luckily entries are sorted alphabetically).

Once the change is located, I can copy both parent value and the child value into clipboard:


I pasted the value into Notepad++, as it contains some XML headers / footers and both versions of script, I removed headers and footers, and separated the scripts into 2 files.

Lastly, I used the Compare Plugin from NotePad++ to compare the differences in both scripts, and I found an additional section in the new MP ( may be related to the error that we are getting (as it has something to do with generating the domain FQDN):


After seeing this, I took an educated guess that this could be the fix to our issue and asked my colleague to load MP version into our Test management group to see if it fixes the issue. When we went to load the MP, we found out that I have already loaded it in Test (I’ve been extremely busy lately and I forgot I did it!). So my colleague checked couple of DPM servers in our test environment and confirmed the error does not exist in Test. It seems we have nailed this issue.


Updating management packs has always been a challenging task (for everyone I believe). In my opinion, we are all facing challenges because not knowing EXACTLY what has been changed. This is because:

  • It is impossible to read and compare each MP files (i.e. the SQL 2012 Monitoring MP has around 50,000 lines of code, then plus the 2008 and 2005 MP, plus the library MP, etc.), they are just too big to read!
  • MP Guide normally only provides a vague description in the change log (if the are change logs after all).
  • Any bugs caused by the human error would not be captured in the change logs.
  • Sometimes it is harder to test a MP in test environment because test environments normally don’t have the same load as production, therefore it is harder to test some workflows (i.e. performance monitors).

And we normally rely on the following sources to make our judgement:

  • The MP Guide. – Only if the changes are captured in the guide, and they are normally very vague.
  • Social media (tweets and blogs) – but this is only based on the blog author’s experience, the bug you have experienced may not been seen in other people’s environment (i.e. this particular error I mentioned in this post probably won’t happen in my lab because I only have a single domain in the forest).

Normally, you’d wait someone else to be the guinea pig, test it out and let you know if there are any issues before you start updating your environment (i.e. the recent bug in Server OS MP 6.0.7294.0 was firstly identified by SCCDM MVP Daniele Grandini and it was soon been removed from the download site by microsoft).

In MP Studio, the feature that I wanted to explore the most is the MP compare function. It really provides OpsMgr administrators a detailed view on what has been changed in the MP and you (as OpsMgr admin) can use this information to make better decisions (i.e. whether to upgrade or not? are there any additional overrides required?). Based on today’s experience, if I start timing before I loaded the MPs into the repository, it probably took me less than 15 minutes to identify this MP update is something very worth trying (in order to fix my production issue).

Lastly, There are many other features MP Studio provides, I have only spent a little bit time on it today (and the result is positive). In my opinion, sometimes, the best way to describe something is to use an example, thus I’m sharing today’s experience with you. I hope you’ve found it informative and useful.

P.S. Coming back to the bug in the Server OS MP 6.0.7294 that I have mentioned above, I ran a comparison between 6.0.7294 and previous version 6.0.7292, I can see a lot of perf collection rules have been changed:


and if I export the result in Excel, I can actually see the issue described by Daniele (highlighted in yellow):


Oh, one last word before I call it the day, to Silect – would it be possible to provide search function in the comparison result window (so I don’t have to rely on Excel export)?