SCOM 2012 R2 – MP Authoring – Getting Modules and Their Configurations

For so long in SCOM 2007, we had the modules we used the most and knew their configuration.  If we didn’t know the configuration parameters or how to use the modules, the Authoring Console would do most of the work for us by either exposing a GUI that allowed us to use the module or at least by exposing each of the different mandatory parameters that needed to be populated.  Of course, it did not expose the optional parameters, but at least it provided a great place to start and most of the time that was all that was needed.

With the 2012 tools – no so much.  Taking advantage of all of the less frequently used modules in 2012 is much more difficult as the VSAE doesn’t give us that nice picker the AC gave us.  Creating new composite modules or even custom monitor types has gotten more difficult and even finding the right MP that contains the module you want to use can be a challenge.

Post discovering the added consolidation functionality with the ExpressionFilter module, I wrote a quick and dirty script that grabs all of the modules current contained within sealed MPs in my lab environment.  This script could very easily be altered to go after the MPs that are sitting in the 2012 reference folders as well (c:\Program Files (x86)\System Center 2012 Visual Studio Authoring Extensions\References\*).

Import-Module OperationsManager
New-SCOMManagementGroupConnection <SDK Server Name Here>

$Path = “C:\Windows\Temp\ModuleConfig.txt”

Out-File $Path -encoding ASCII

ForEach ($MP in (Get-ScomManagementPack | ?{$_.Sealed -eq $True})) {
$MP.Name | Out-File $Path -encoding ASCII -append
ForEach($Module in ($MP.GetModuleTypes() | sort Name | Sort XMLTag)) {
“`t” + $ + ” – ” + $Module.XMLTag | Out-File $Path -encoding ASCII -append
if($Module.Configuration.Schema -ne $null) {
“`t`t” + ($Module.Configuration.schema.split(“<“) |
?{$_ -match “^xsd:element.*”} |
ForEach{$_.substring($_.indexof(“name”)).split(“=”)[1].split()[0]}) |
Out-File $Path -encoding ASCII -append
“`r” | Out-File $Path -encoding ASCII -append

Popping open the output and looking for the System.ExpressionFilter yields the following under the System.Library MP:

System.ExpressionFilter – ConditionDetectionModuleType
“Expression” “SuppressionSettings” “MatchCount” “SampleCount” “WithinSeconds”

Perfect!  There’s the name, the module type and the configuration parameters we expect now with the 2012 R2 module.

Management Packs, MP Authoring, SC Operations Manager

Leave a Reply