SCOM Author Meets the REAL VS Authoring Extensions

19 Feb

Yhea! Now its time for the real stuff. In my last post I mentioned the Visual studio Authoring Extensions. And now I am going to give you a first quick hands on. We are going to build an management pack that will discover all your Symantec Agents and monitor the running state of it. When not running it will give an error and a unhealthy state. Pretty easy stuff for you reading this blog but its not the MP but the Authoring VS extensions that have the focus here.

Okay here we go.

First this. This blog post is based on a pre build and can contain other features that may or may not be present in the RTM build.

After installing the VS Authoring extensions we startup VS and select to create a new project.


Now select the Management Pack –> Operations Manager –>

You will see for now 2 project templates. We select the Core template and fill in a good name.


We have now a empty MP project. So next we have to think what we need to create for this MP.

1) Class type for the Symantec Agent

2) Discovery rule to discover the Symantec Agent

3) Monitor rule for the NT service Check of the Symantec Agent

4) Views to display the Symantec health state.

1 Class Type

As always we start at number 1. Go to add a project item for the class to create. Right click on the project and add –> New Item


Go to the XML templates and choose Class. And give it the correct name.


If you choose a item template out of the XML folder it will means that you will have to go type the old fashioned XML again. Ill think this will be replaced by an real class create template wizard soon. I hope so…

So said that we open the just created Class MP fragment. And we change the class internal / display name first. Next we change the base to “Windows!Microsoft.Windows.LocalApplication” because I like to use this predefined MS class. Oh do not to forget to set the Hosted to true. As a bonus we add a property “ProductVersion” as a string value.


And yes we have finished step 1.

2 Discovery rule

To create class instances for the class created in step 1 we need a discovery rule. Since the best way to discover the Symantec agent is the registry we are going to use a registry key discovery rule. So when a windows computer has the Symantec agent on it a new class instance Symantec agent will be created and the product version number will be filled in. The registry key to check for the agent service existence is “SYSTEM\CurrentControlSet\services\Symantec AntiVirus” and for the product version “SOFTWARE\Symantec\Symantec Endpoint Protection\SMC\ProductVersion”.

Again next we are going to add a project item. This time it will be a Discovery template.


Good for us it is a real template so (almost) no need for XML. 


Take a good look at what you are seeing now. On the left you will see all the objects created by the templates. In this case it will be one. But you can create more by pressing right click. On on right side we see the property window. And this is the most important one. All the wizard stuff we where having in the ‘normal’ authoring console is gone. You will have to use the property window to supply the values. It looks a bit more work but its not so bad at all because most of the properties have filled select lists behind it.

So we are going to specify the properties. After we fill in the common properties as: Display name , ID , Description, we start with the Module –> Datasource Type ID . Press on the … icon. And choose the filtered registry module type.


  Next is to specify the Module type configuration. Go to the “Data Source Configuration” and press on the (Configuration XML). And now we have to type in the registry configuration  by using XML. Hope this will be changed to a wizard later on. For now we will have to create the XML by hand. Good for us the is a XSL schema helping out. We are going to use the registry keys mentioned earlier in this module.


Next we specify the class instance to create. This is a bit more click work but very self explaining.


The complete discovery properties will be at the end.



3 Monitor rule

Now the real core why we are making this MP. The monitoring check of the Symantec Agent service state. Again we add a new project item. This time we select the Templates –>  Monitor (unit) template.



And again we have to specify the properties. After the general ones we set the Target for this monitor.


Select the Class we have created in step 1.


Now we have to specify the Monitoring module type to use.


And we select the NT service monitor module type.


Next the parent monitor for the heath rollup



And also important the instance states to use.



But the most important is of course the configuration of the module type.


And again we have to type XML with XSL schema help. We will have to know first the NT service name. Lets use PowerShell to get this name instead to the SC command.


So the name will be “Symantec AntiVirus”. So the XML configuration will be:


The complete final properties list will be:



Now the MP is operational , you could now build and import it , but some end user view would be nice too.

4 Views to display

We are going to create 2 state views in a folder.  One showing all Agent states and one showing only the unhealthy ones.

And yes , I know what you are thinking …. we are going to add a new project item Knipogende emoticon

We start with creating a folder to hold the views.


We have to specify the folder in XML:


Now we have the folder we are going to create the views. Templates –> View (Custom)



this time we have to use the properties to specify the view configurations. We fill in the common ones.


And we specify the View configuration and View Folder.

For the second view showing the unhealthy ones  we have to specify the View Configuration as below:




And yes yes we are ready to build !!!!

Simply press F6 to build. Now after a successful build go to the management pack created.


The MP file location will be :


and the MP (unsealed) file will be here:


At this point you can test the MP with the already super tool Authoring Console with the Work flow simulator. If all is okay you can do the last step.

Last step is to import the MP into the SCOM MNG group. An no we don’t have to do this by hand!! We can do it from out of VS too.

Go to the project properties and select the “Management Group” tab.


Add a new MNG connection.

After testing the connection you can simply press F5 to build and deploy the unsealed MP to the MNG group.

If you want a sealed one you must specify in the build tab a certificate.


So simple as this it is….

So now you have created your first MP with the new VS authoring Extensions. But WAIT what did we forget !!!! Check-in the solution into Visual Source Safe … really use a Source Safe system to safe your live some day!!!

Next time I will blog more about this super cool new authoring tool. I think I am going to take you guys on the how to create a dashboard widget tour….

Hope you liked this blog and …..

Happy Scomming.

Michel Kamp


2 Responses to “SCOM Author Meets the REAL VS Authoring Extensions”

  1. Test February 18, 2015 at 00:58 #

    Ultimate Article .

    • Test February 18, 2015 at 00:59 #

      Can you please explain the Custom moudles.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

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