Huntland Services Ltd

Tel: +44 (0)1392-490518
Fax: +44 (0)1392-428003
Enquiries@huntland.co.uk

Dump Mom Rules For a Given Group

Back Download The Script

 

ShowScvhedule.vbs

In the MOM Admin Console rules are administered through Processing Rule Groups.  These groups contain both rules and sub-groups.  Some groups only contain subgroups.  It can be very difficult to work out what rules are being applied courtesy of the default processing rules supplied with Mom.  The purpose of this script is to make that easier.

DumpMomRulesCMD.vbs will write all the rules and subgroups for a given starting group, to a text file for easy reading.  The name of the file will be the name of the Processing Rule Group with a txt or csv extension:

c:\temp\Microsoft Message Queue (MSMQ).txt
c:\temp\Microsoft Message Queue (MSMQ).csv

The output can be one of  two possible formats indicated on the command line. 'TXT' format is a nice hierarchical text format (you will need to switch off word wrap to appreciate this):

(Level0) Microsoft Message Queue (MSMQ) (Enabled)
      (Level1) Microsoft Message Queue (MSMQ) 1.0 (Enabled)
           (Level2) Microsoft Message Queue (MSMQ) shared (Enabled) 
            1. Event - A new backup site controller ( %1) was added. (Disabled)
            2. Event - A new site (of PSC %1) was added. (Disabled)
            3. Event - A primary enterprise controller was replaced (from %1 to %2). (Disabled)
            4. Event - A primary site controller was replaced (from %1 to %2).
            etc.

'CSV' format is a comma separated file for use with excel.

Parent Group

Group

Rule

Enabled

Rule Type

 

 

 

 

 

 

 

 

 

 

   

Run this from the command prompt using the following syntax:

Cscript //NoLogo DumpMomRulesCMD.vbs "myServer" "c:\temp" TXT "Microsoft Message Queue (MSMQ)"

It takes as its input:

  1. The Name of the Mom SQL server - this is the server that has the OnePoint database.  Incidentally OnePoint is hardcoded so if you have a different database name change this in the script.
  2. Output Directory - this is the full path to the folder where the output files will be dumped.  Notice this folder must exist before the script is run.
  3. The File Format - TXT indicates the hierarchical arrangement of groups and rules in an ordinary text file readable using Notepad (with word wrap switched off). CSV indicates a comma separated file for use with Microsoft Excel.  The latter output is a simple list of the rules.
  4. Rule or Group Name - this is the name of the rule/group as it is displayed in the Mom Admin console 'Processing Rule Group Node'. This argument must be a perfect match (case insensitive). It doesn't make any sense to use wild cards.

To make life easier this script can be run using a batch file which dumps all the default Processing Rule Groups.  The batch file is dumpMomRulesCMD.bat and can easily be edited to suit whatever processing rules exist on your system.

 

Please accept this script as is.  Any feedback will be gratefully received at Debug@Huntland.co.uk