I am learning to use SCOM in order to develop a SCOM pack. The only usable tool I have found (yet) to develop a pack is Visio (with the management pack designer).

I managed to create a pack that monitors a specific service, and now I want to create a pack that monitors a role. Visio requires me to enter either the role id, HKLM key, HKLM value or WMI query to find the service. What I want to do is monitor the IIS server role. I found the role id of IIS (2), but I couldn't export the pack, some problem with visio. So now I want to try with HKLM - but how do I find the key/value for IIS?

Or am I in a completely wrong path?


I found your question because I had a similar problem.

In the end, I changed the discovery in Visio to use a registry key, generated the MP, and then edited the resulting XML to remove the registry-based discovery and replace it with a WMI query.

I my case, I wanted to discover the Print Server role (ID=135), so the discovery I used was this:

  <Discovery ID="My.Management.Pack.Discovery.Print.Server.Seed" Enabled="true" Target="Windows!Microsoft.Windows.Server.Computer" ConfirmDelivery="false" Remotable="true" Priority="Normal">
      <DiscoveryClass TypeID="My.Management.Pack.Class.Print.Server.Seed">
        <Property TypeID="System!System.Entity" PropertyID="DisplayName" />
      <DiscoveryRelationship TypeID="Windows!Microsoft.Windows.ComputerHostsLocalApplication" />

    <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.WmiProviderWithClassSnapshotDataMapper">
        SELECT Name FROM Win32_ServerFeature WHERE ID=135
            <Value>Print Server Seed</Value>
  • Exactly what I did. After fighting with Visio and seeing that the code that was generated, I stopped using it and used the MP Authoring tool. The resulting XML is clean, easy to understand and usable. – vainolo Jun 24 '13 at 7:57

check this link out as well for role id's


  • 1
    Welcome to Server Fault. While this might technically answer the question it is much more helpful to include highlights from links. Links tend to break over time (even from MS). – squillman Oct 29 '13 at 1:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.