Wednesday, March 30, 2011

Bug in scripting in SCOM

In the DOS there is one unpleasant bug that manifests itself in SCOM. If one of the parameters contains quote, then quote will be lost in the end. What then shall we do?

We can use Enviroment Variables for transfer theese parameters.
Btgore transfer set variable in command line
SET param1=His name is "Bond"

In script read this parameter from enviroment vaiable

Set objShell = WScript.CreateObject("WScript.Shell")
Set oEnvVars = objShell.Environment("Process")
Wscript.Echo oEnvVars("param1")

That all.

Monday, March 28, 2011

Favorite Tasks in SCOM - hidden value

It's really interesting when you find some valuable capabilities in product which you use every day. For SCOM it's really usual thing because of poor documentation :) And today I want to share the "Favorite Tasks" feature which is not well known but really useful for you if you have some often-used tasks. So, look - it's easy!

Step 1 - choose your popular task and right click on it:
choose "Add To Favorites" and click it...

Step 2 - go to any view (e.g. Alert View) where task target is available and enjoy - submenu "Favorite Tasks" appears in context menu!


So now you can enjoy you favorite tasks from context menu!

original article is published on System Center Central

How-to transfer override parameters from the unit monitor to diagnostic task

  • There is a display unit based on Microsoft.Windows.TimedScript.PropertyBagProvider.
  • There is a diagnostic TASK tied to the unit monitor, based on Microsoft.Windows.ScriptProbeAction
  • It is necessary to pass the values of override parameters in the diagnostic task

So here we go:

  • Modify the script monitor, so that it returns the value of its parameters

Call oBag.AddValue("Minimal Table Size", nTableSize)

Call oBag.AddValue("Minimal Fragment Size", nFragmentSize)


  • After that, modify the default values diagnostic task follows

<TableSize>$Data/StateChange/DataItem/Context/DataItem/Property[@Name='Minimal Table Size']$TableSize>

<FragmentSize>$Data/StateChange/DataItem/Context/DataItem/Property[@Name='Minimal Fragment Size']$FragmentSize>

We all got those values of override parameters monitor for which there has been a change state

Also you can read greate post about DataItem from motitor context