You are browsing the archive for SCOM2012.

SCOM: Configure a monitor recovery task for a healthy state

12:06 am in operations manager, SCOM, SCOM 2012 by Dieter Wijckmans

During a recent project a client had a small request to create a monitor and run a command when a device was not accessible anymore. Easy right! But (yep there’s always a but) they wanted to run a command when the monitor was returning back to a healthy state to restart a service when the device came back online… Hmmm and all in 1 monitor.

So the conditions were as follows:


  • Action: Run a PowerShell based monitor to test the connection with the device
  • BAD: Device is down => Run recovery task to remediate
  • GOOD: Device is up again => Run recovery task to restart service

(note: Always do this small matrix of a monitor design to exactly know what the customer wants)

I don’t have the device to simulate but came up with a small example in my lab to show you how to get this working with just 1 monitor. The situation in my lab is very simple. I want to turn on my desk lighting when my pc is on (and I’m working) and turn it off when my pc is not online.

My conditions:


  • Action: Run Powershell based monitor to test the connection and pass the result to SCOM
  • BAD: PC is offline: => turn off my desk lighting
  • GOOD: PC is online:=> turn on my desk lighting

So first things first we need to test the connection to see whether my pc is running. To check this I’m using this small script:

param ([string]$target)
$API = New-Object -ComObject "MOM.ScriptAPI"
$PropertyBag = $API.CreatePropertyBag()

$value = Test-connection $target -quiet

$PropertyBag.AddValue("status", $value)


So I’m testing the connection and sending the response to SCOM. The  PowerShell “Test-Connection $target –quiet” command will just return true or false as a result whether the target is accessible or not

Creating the Monitor with Silect MP Author

The creation of this monitor consists of 2 parts:

  • Defining the class where the monitor will be targeted to and therefore the machine which will test the connection to the desktop
  • Passing the status from the machine to SCOM and take action by using a monitor

Defining a class:

To properly target this monitor we need to create a class in SCOM which identifies the servers that need to test the connection. In this case I’ve added a reg key to all servers who need to ping the desktop so I’m starting a Registry Target to create my class:


I fill in a server that has the key already in there to make it much easier to browse the registry instead of typing it in with an increased margin for errors.


Select the Registry key you want to look for


In my case I’ve added a key under HKEY_LOCAL_MACHINE\Software\pingtestwatchernode


Select the key and press add and ok


Identify your registry target:


Identify your discovery for the target


In my case I just check whether the key is there. No check on the content.


The discovery will run once a day.


Review everything and press finish


At this point our class is ready to be targeted with our script monitor.

Next up is to create the monitor:

Create a new script monitor:


Browse to the PowerShell script and fill in the parameters. In this case I have 1 parameter which is “target” and will hold the IP of the desktop.


Define the conditions:

Healthy condition is when the status is true and type boolean


Critical condition is when the status is False


Note: I’m using a “boolean” Type

Configure the script and select the target you have created earlier on and the availability parent monitor


Identify your script based monitor


Specify a periodic: run every 2 minutes


No alert generation necessary.


Review all the parameters and create the script based monitor.


Load the management pack in your environment and locate the monitor:


Check the properties => recovery tasks and create 2 recovery tasks for the Health state “critical”.

Note that the screenshot below already shows the correct healthy state after config of the mp.


Export the managment pack and open it in an editor and locate the “recoveries” section to find your recovery tasks we just created:


scroll to the right and locate the “ExecuteOnState” parameter and change the one you want to run when the monitor goes back to healthy from “Error” to “Success”

Save the management pack and reload it in your environment.


So all we need to do is test it…

My pc is on: IT-Rambo has his cool backlight:


My pc is off and the light is automatically turned off…


Final Note: If you use this method you need to make sure to NOT save the recovery tasks in the console anymore otherwise the different settings we just changed in our management pack will be again overwritten as SCOM can’t natively configure a recovery task for a healthy state.

You can use this basically for anything where you want to run 2 conditions on the same monitor or even 3 if you have a 3 state monitor.

Home automation: Putting a child lock on my Nest thermostat using SCOM

10:23 am in SCOM 2012, sysctr by Dieter Wijckmans


This post is part of a series on how I demonstrate how to use SCOM to basically monitor everything. The other parts can be found here:

After I have successfully been able to get data into SCOM from my Nest Thermostat and my Flukso energy meter it’s time to do some cool stuff with it. More devices are in the pipeline to get data into SCOM to create the ultimate Domotics controller or should I say “SCOMotics”…

The world: Keeping an eye on Teen Trouble

One problem I have in real life is the fact that it’s very hard to explain to my wife and kids the process off radiant floors. It takes some time to heat up but it stays warm a long time so there’s no point in setting the thermostat to a higher point to get instant heat because it takes approx 1 hour to heat up 2 degrees celcius (something I also learned from getting my Nest thermostat data into SCOM).

But you can explain all you want if they find it chilly they’ll turn up the thermostat assuming it will get warm instantly but in fact they are just using more energy than necessary to heat the house in 2 hours when they already left the house.

So the mission was very simple. To stop them from doing this. Yes… I could put a lock code on the Nest thermostat and make it only available to me but if I’m not home and they really need to put the heating higher they are not able to do so.

So I came up with another solution: Setting a hard limit on the degrees and enforcing it.

So in short what do I need to achieve with SCOM:

  • Detection of the current temperature set: Target temperature
  • Alerting when the Target temperature breaches the set limit
  • Take corrective action to make sure the target temperature is set below the max temperature.

So let’s start with the detection of the current target temperature. I can reuse the work I already did to read in this value and compare it to the limit. To keep track of things and as this is a more general approach I’ve documented the process of creating a PowerShell script monitor using Silect MPAuthor here:

So now that we have the monitor in place let’s check out whether it’s working!

First of all I’m setting my nest thermostat to 20 Celsius while my limit is set to 19 Celsius:


After the first run the monitor is picking up that indeed the temperature is higher than the requested limit. This is detected by running the PowerShell script monitor we’ve configured earlier:


Here you can see that the Recovery target which I configured kicked in as well. This recovery target consists out of a PHP file which is located on my Webserver and loaded by using the PowerShell Invoke-Webrequest module..

Note: I’m running this recovery against my Watchernode class which consists of 1 server and thus I’ve copied the “settempnest.ps1” to the local folder of that particular server.

How did I configure the recovery task

First open the monitor and click add on the “configure recovery tasks” section


Fill in the name of the recovery and select the status where to react upon.


Enter the command:

  • Full path: C:\Windows\System32\WindowsPowerShell\V1.0\powershell.exe
  • Parameter: -noexit “& “C:\scripts\settempnest.ps1″


The powershell is running a invoke-webrequest on my webserver. The PHP script it is running is copied below:


require 'inc/config.php';
require 'nest-api-master/nest.class.php';

define('USERNAME', $config['nest_user']);
define('PASSWORD', $config['nest_pass']);

$nest = new Nest();
$nest->setTargetTemperatureMode(TARGET_TEMP_MODE_HEAT, 18.0);

So after running the recovery we see the monitor changing back from error to healthy:


There we go… All good again saving some energy


And final check on the thermostat itself… Back humming at 18 degrees.


SCOM: Creating a PowerShell script monitor with Silect MPAuthor

10:15 am in SCOM 2012, sysctr by Dieter Wijckmans

Sometimes it’s necessary to create a monitor to monitor something which is not included in the standard management packs. Unfortunately it’s not possible in SCOM  to use PowerShell to crerate a script monitor in the scom console. Although it’s not a good idea to start authoring in the operations console it sometimes can be a quick and easy way to create a monitor.

Recently Silect Sofftware released a free version of MPAuthor to create your management packs. I’m using this to create my script monitors to collect and monitor the data which I use in my monitoring my home series:

Download the tool here:

Below is an example of how I monitor the target temperature set on my Nest Thermostat.

So open the tool and create a new management pack => Create New Script Monitor…


Name the script (if you have the script somewhere as a PS1 file it will load the script body automatically.


This is the script I’m using:

[void][system.reflection.Assembly]::LoadFrom(“C:\Program Files (x86)\MySQL\MySQL Connector Net 6.8.3\Assemblies\v2.0\MySQL.Data.dll”)

#Create a variable to hold the connection:

$myconnection = New-Object MySql.Data.MySqlClient.MySqlConnection

#Set the connection string:

$myconnection.ConnectionString = "Fill in the connection string here"

#Call the Connection object’s Open() method:


$API = New-Object -ComObject "MOM.ScriptAPI"
$PropertyBag = $API.CreatePropertyBag()

#uncomment this to print connection properties to the console
#echo $myconnection

#The dataset must be created before it can be used in the script:
$dataSet = New-Object System.Data.DataSet

$command = $myconnection.CreateCommand()
$command.CommandText = "SELECT target FROM data ORDER BY timestamp DESC LIMIT 1";
$reader = $command.ExecuteReader()
#echo $reader
#The data reader will now contain the results from the database query.

#Processing the Contents of a Data Reader
#The contents of a data reader is processes row by row:

while ($reader.Read()) {
#And then field by field:
for ($i= 0; $i -lt $reader.FieldCount; $i++) {
$value = $reader.GetValue($i) -as [int]
#echo $value
#$value = $value -replace ",", "."

if($value -gt $maxtarget)
$PropertyBag.addvalue("Desription","Target temperature currently set to " + $value + ": is higher than the maximum target temp " + $maxtarget)
$PropertyBag.addvalue("Desription","Target temperature currently set to " + $value + ": is lower than the maximum target temp " + $maxtarget)


Note that you need to pass the parameters through to SCOM via the propertybags. I also am a fan of doing the logic in the script itself as shown above to avoid any logic in SCOM afterwards. It’s far more easy to do the comparison in the PowerShell script. In this case I’m setting State to either ERROR or OK. This also avoids the format conflict of the output whether it’s a string or an integer.

I’m setting the maxtarget parameter to 19


Next you need to create the conditions for the monitor states:


As I’m only using a 2 state monitor I’m deleting the OverWarning state and only using UnderWarning (= Healthy state) and OverError (= Error state).


For the Healthy state I’m detecting the “State” property value as OK (note that I’m defining the Type as a String as the state is just plain text)


For the Error state I’m detecting the “State” property value as ERROR


Now we need to target the monitor. In my case it’s the watcher node target I’ve created earlier on.



Naming and enabling the rule


Set the schedule how many time to check the status of the max temp


Speciffy the alert that needs to be raised if any:


And create.


Now save the management pack and test it in your environment.

Test drive Opslogix VMware management pack

9:02 am in SCOM, SCOM 2012 by Dieter Wijckmans


System Center Operations Manager (SCOM) has been proven to be a great product to monitor your environment from end to end. It has grown version after version and has in my believe outgrown its status of monitoring only Microsoft Windows already for quite a while now. A lot of management packs are out there, some good some less good (let’s keep it diplomatic). When you are a SCOM admin you mostly come across the same management packs from the same vendors. From time to time it’s nice to see a new contender step into the arena with a management pack for a technology which can already be monitored by other management packs.

Recently Opslogix the Dutch company founded in 2009 released one of those management packs which I took for a test drive: VMware® Intelligent Management Pack.

I requested a trial to find out how well it weighs up to the competition. Opslogix is stating that this management pack is a far better choice based on cost vs monitoring. So I took it for a spin through my environment. I’m a SCOM expert but not a VMware expert so for me also the aspect of easy to install and comprehend the management pack and the overview of the environment was also a very valid point.



When you install a management pack from the online catalog it is normally a straightforward process. The management pack is downloaded in the background and automatically added to your environment. That’s it. But with non Microsoft management packs this can be another story. Luckily the Opslogix management pack comes with a very detailed install manual and the installation was a breeze. The clear manual stated exactly what steps needed to be taken to install the management pack.

The management pack consists out of 4 different management pack files (Base, licensing ui, VMware and VMware reports). The import is straight forward like you would import any other management pack. Once imported there are still some extra steps that need to be taken to make sure you can connect and monitor your environment. One of the things you also need to keep in mind is the fact that you need to register your license in the SCOM console as well otherwise the discoveries will not kick off. Well documented in the management pack guide but I can fully understand your enthusiasm to get this going that you forgot to do it.

Next up is to define which management server is used to monitor your VMware environment. As all people who are using SCOM 2012 probably already know the resource pools let you divide monitoring between different management servers. In this case this is very handy and well thought of Opslogix because it could well be possible you only have 1 management server facing the internet or your VMware environment. In this case you can populate your resource pool with that server and you are good to go:


Next thing you need to do is add VMware environment to your SCOM environment. Again no hassle with certificates or whatsoever. The Opslogix management pack comes with a straight forward GUI to connect your environment. Just check out monitoring and open up the VMware IMP Configuration Dashboard. Fill in your data, check connect and when the connection was successful you now have a connection to your environment. BUT no monitoring yet.


Last thing to configure is adding the license you have received from OpsLogix to your environment. The license GUI lets you connect your environment we just added to your license. This is needed to calculate the cores which were included in your license.


So that’s it… All ready to go.

What’s in it?


One of the things I always do when a management pack is installed is browse through the views to see what can be visually shown to me but more important to the potential users of the console / environment.

Nothing surprising here actually. Nice views to check out the alerts, status of my devices and some performance views. Nothing more nothing less. Just the things I like to see to get a quick overview. Maybe a full dashboard to get a quick overview would have been nice but hey we can build that ourselves right!

Next I always browse through the rules and monitors. I’m not going over them 1 by 1 but in fact there are enough rules and monitors in the management pack to get you notified when things are wrong. Again I’m not a VMware expert but after the connection to the demo environment I instantly got alerts (probably generated on purpose) that were even for me clear to understand. The discovery process was definitely kicking in because all the different servers were discovered.

If you look through the included monitors and rules you’ll notice that all the different aspects of you VMware environment will be covered. All the rules and monitors are there to generate that desired view of your environment and warn you when things are about to go wrong. Nothing more, nothing less: Just the way I like it. Not drilling through a lot of rules and monitors to disable or enable them. Less config time is more monitoring time…

One thing I really like about a management pack and especially a third party management pack is that it comes with reports. As a SCOM admin I have a pretty good knowledge of what’s going on in my management group and with the servers but to a user / manager it is very hard to explain that there are issues or all is going well. Especially managers and application owners love reports they get in their mailbox on a regular base to keep track of things. Although it is not that hard to create your own reports it’s always nice to have some out of the box to get you going and save you some time in the process.


I looked around in the reports and noticed that indeed there were many reports targeted to an overall view of your environment. Most of the time that is exactly what you are looking for because normally the servers which are running on your virtual environment are also monitored by your rules for monitoring your OS. This is basically in a nutshell what this management pack is intended to do: monitor your infrastructure and give you a helicopter view of everything living in your virtual VMware environment.


The Opslogix management pack proved to be a sound experience on the field of install, config and connection. The installation was easy and not a lot of extra steps had to be taken to get it up and running. After the install it just started the discoveries and just started to… work. I have witnessed other management pack which have to be overridden en fine-tuned before they even produced any events or discover any new servers.

An added bonus that a lot of people are overlooking is the fact that a management pack discovers a lot of classes. This Opslogix management pack is no exception. You can use the discovered classes in your distributed applications and dashboards to even further extend your view on your environment. If you do not load a management pack this process can be tedious because you need to discover all the different types you want to add to your dashboard yourself.

If you are looking for a VMware management pack that’s easy to install, has more than enough monitors and rules on board to give you an essential clear view on your environment AND has the necessary reports: make sure to drop Opslogix a line for a demo license.

It’s all up to you on what exactly you want to monitor on your VMware environment. If you just want to monitor the health of your environment and like the ability to proactively react to issue this could be a great consideration!

For more info check out the Opslogix website:

SCOM 2012: Overview link blog

11:41 pm in SCOM, SCOM 2012, sysctr by Dieter Wijckmans

This post will be my (and hopefully yours) one stop to post all the relevant info to SCOM 2012. I will try to generate an overview of all the different steps you need to start from scratch and continue to build your environment to a level that suites your environment.

If you feel there are things missing or you’ve found dead links please do not hesitate to leave a comment and I will update this post. This post has grown out of my favourite list of SCOM related topics and info I found on forums, technet and blogs.


    • I’ll sometimes post more than 1 link at a topic so you can combine the different blogposts to get the bigger picture.
    • Most of the info is relevant for SCOM 2012 and SCOM 2012 SP1 (if there’s specific info for a specific version it will be pointed out.)
    • This is a link post to relevant info I found on the web. All credits and copyright belong to the respective authors.

SCOM 2012 R2:

General information:

This section lists all links that will give you a general overview of SCOM.

Design and Topology

This section lists all links that will help and guide you to make a proper design and take the correct decisions concerning topology

How to install

This section lists all links to the install walkthroughs and possible issues.

Configuring scom

This section lists all links to help you quickly setup scom after you have succesfully installed it.


Specific configuration

This section lists all the different aspects of SCOM that need additional installation or configuration



APM (Application Performance Monitoring)

Gateway configuration

Network Monitoring

Azure Monitoring:

Management pack basics

This section lists all the links to give you the basics about management packs


Management pack advanced

This section liste all the links to the more advance management pack tips and tricks.

Community Management packs

A list of must have community management packs to increase your productivity and solve some gaps and functionalities in scom.

Note: These management packs are written by members of the community so no warranty is given. Test before you use in production!

Integration possibilities

This section lists links to different integration possibilities between the different System Center products.


Usefull blogs and sources for this list (In random order of importance)

Note: System Center Blogs: Now on iPhone, Android and Windows Phone

Tips & Tricks

Cool Showcases with SCOM

Partner solutions for SCOM (in random order)


SCVMM PRO integration: InvalidRelationshipSourceExceptionOM10

10:36 pm in SCOM 2012, SCVMM, sysctr by Dieter Wijckmans


During my Masterclass last monday I showcased the different integration possibilities between the different system center products. One of the integrations I showcased was the integrations between SCVMM 2012 to SCOM2012.

I followed all the different steps to get things up and running but when I wanted to test the actual PRO integration service I found I had an issue.

The connection details showed an error:

“Operations Manager discovery failed with error: “Exception of type ‘Microsoft.VirtualManager.EnterpriseManagement.common.discoverydatainvalidrelationshipsourceexceptionOM10’ was thrown.



Talking about a strange error message. I checked my SCVMM jobs but nothing was out of order.

Reboot of the machine also did not solve the issue. Well here is actually how I solved the issue by following a rather strange trick.


Deselect both “Enable PRO” and “Enable Maintenance mode integration” and click refresh.


Now the connection is OK to my Opsmgr environment.

Well let’s continue with testing my PRO by enabling it and refreshing.


Error 25922 “PRO Diagnostics Target cannot be found” was thrown. A refresh of the connection once more and this was solved.


Error 25923 “PRO Diagnostics Target is not monitored” was thrown. Apparently there was still no SCOM 2012 agent on the SCVMM server due to the fact that it was not yet switched over to the new SCOM2012 environment. So pushed the agent.


After the SCOM agent was pushed another try was successful to initiate a test PRO towards scom and the message appeared in the console:


A good resource to troubleshoot the error messages can be found here:

SCOM 2012: CU1 available for download

9:34 pm in Uncategorized by Dieter Wijckmans

SCOM 2012 is just generally available and the first CU1 has already arrived.

You can download it here:

For a full list of the improvements check the official KB:

For the install experience check this blog post of Kevin Greene:

My personal experience with the install will follow shortly.

Don’t you just like the constant improvement of the System Center products?

SCOM 2012: What’s new: Default behavior of overrides

11:46 pm in Uncategorized by Dieter Wijckmans

This post is part of a series What’s new: Check here for the other parts.

SCOM has some huge changes on board… But some are rather small and go unnoticed to the untrained eye although they could save you a major headache.

I’m pretty sure not a lot of hands will be raised when I pop the question: “Are you 100% sure your default management pack is free of overrides, if it’s not you buy me a beer?”. Although this is not that important because (let’s face it) it works doesn’t it? You will at one point or another have a big headache when you want to delete or upgrade a management pack which has an override stored in the default management pack. This makes the default management pack referenced by the management pack and therefore you can’t delete it.

Although a lot of new System Center admins make this error I must admit it’s in fact quite easy to make the error… Just click next and it’s there…

In SCOM2007R2 the default behavior when creating an override is storing it in the default management pack:


NOTE: Notice that My default management pack name has been changes to something which draws a little bit more attention when you want to click OK to minimize the possibility you click ok to fast. Check here how to do this:

This is one of the first things to do on my checklist when I open the console at a new client. As this is not ruling out the fact that you once in a while just click ok to fast it helps avoiding some issues.

In SCOM2012 this behavior is changed. Now you need to explicitly select a management pack before you can click ok. Making my linked blog post above completely useless but hey you can’t win them all Smile


This small adaption will keep a lot of default management packs clean and will score me a lot less free rounds of beer but hey… it’s for a good cause Smile

While we are on the subject make sure you use the proper approach for storing your overrides.

Marnix Wolf MVP has written a nice blog post on the subject: Storing overrides, the good, the bad and the ugly.

His conclusion:

When storing Overrides, store them in a single unsealed MP which is dedicated only to the MP where you’re making the override for. So overrides for the SQL MP go into the unsealed MP ‘Overrides SQL’ and overrides for the Server OS MP go in to the unsealed MP ‘Overrides Server OS’. This is the only viable and workable option. All other options cause issues, sooner or later.”

Meet the System Center Operations Manager 2012 Experts

10:57 pm in Uncategorized by Dieter Wijckmans

I have the privilege of giving a session at the “Meet the System Center operations Manager 2012 Experts” event of Scug NL on 06/01/2012.

On the link below you can find the different topics + timetable.

I’ll go over the different aspects of preparing yourself for the upgrade / move to the next best thing SCOM2012 by planning and not by being the IT_Rambo for a change…

There’s a good chance that IT-Rambo will surface in NL.

So if you see him start hitting next as quick as possible!rambo-ii-9

SCOM 2012: Webconsole fails to load after upgrade

9:15 pm in Uncategorized by Dieter Wijckmans

In my recent session I’ve showcased an error I encountered when upgrading my SCOM2007R2 environment to SCOM2012beta.

After the upgrade was finished successful I performed my standard after migration health check and opened my web console to check out the new features of the SCOM 2012 console.

Only to find out this very “nice” cryptic error message:


Apparently this is because the ASP.NET version was installed after the IIS role and the new web app “SCOM 2012 Web Console” was never registered to use this version of ASP.NET with the IIS role.

So what are we going to do now… well euhm… Fix it Smile

Open an elevated command prompt (make it a habit, this will save you a lot of trouble in your live)


Open explorer and browse to “c:\windows\\Framework64\v4.0.30319\”

Note: Make sure you use your installed framwork and version


Locate the file aspnet_regiis.exe and drag it into your elevated command prompt and add the switch –iru at the end as shown below. printscreen0053

This actually will reinstall the ASP.NET version into the IIS sites so they can all use the new version. Sites which already use the new version are left untouched.printscreen0054

Finished installing… So we’ll see what happened to our console!


Well it’s loading up fine at this point Smile

Note: You’ll need to have Silverlight installed. If you don’t have it on your machine a nice kind message will appear whether you want to install it. I’ve installed it in advance as it is one of the prerequisites.


There we have our nice brand new shiny Scom 2012 web console which we can start exploring Smile