Using the Command-Line Interface

MOM Reporting provides a command-line interface. This interface allows you to automate the report generation process. For example, you can create a batch file that contains the commands to generate the reports you want. Then, you can use Windows Task Scheduler, as explained in Scheduling Report Generation, to run that batch file at scheduled times. For more information about automating the report generation process, see Automating Report Generation.

To generate multiple reports from a batch file, prefix each command in the file with the START /WAIT command. For more information about the START /WAIT command, see the MS-DOS help.

Note


MOM Reporting provides the EEAREPT command for generating reports.

Syntax

EEAREPT /PRINTBATCH report [/OUTPUT:{P|H[=folder]}] 
  [/DATERANGE:dates] [/HOURS[{:S=hh}|{:E=hh}|{:S=hh, E=hh}]
  [/DAYS:n] [/SERVERS:servers] [/DATASOURCE:DSN=dsn]
  [/DESCRIPTION:{Y|N}] [/FOREST:'fname'] [/DOMAINS:'domnameA' [,'domnameB']]
  [/USERS_INCLUDE:'user1' [,'user2']] [/USERS_EXCLUDE:'user1' [,'user2']] [/TOP:<number> [ PERCENT] ]
  [/IP_ADDRESS_LIST:'label1=ipAddress1'[,'label2=ipAddress2'] ]

Options

The options are defined as follows:

/PRINTBATCH
Directs MOM Reporting to generate the specified report.
report
Specifies the name of the report to generate.
/ARCHIVE
Archives previously generated HTML reports.
/OUTPUT:{P|H[=folder]}
Specifies the type of output for the specified report:
P Prints the report on the default printer.
H Generates the report as HTML files in the specified folder.
/DATERANGE:dates
Specifies the dates for which to generate the specified report. The dates variable can be set to one of the following values:
S=yyyy-mm-dd E=yyyy-mm-dd
Specifies the start and end date for the report.
THISWEEK
Includes data from Sunday through Saturday of the current week.
LASTWEEK
Includes data from Sunday through Saturday of the previous week.
YESTERDAY
Includes data from the previous day.
TODAY
Includes data from the current day.
THISMONTH
Includes data from the first through last day of this month.
LASTMONTH
Includes data from the first through last day of the previous month.

Note


/HOURS[{:S=hh}|{:E=hh}|{:S=hh, E=hh}
Specifies the range of hours to include in the specified report. If used with the /DATERANGE option the report will include this time range for each day specified by the /DATERANGE option:
S=hh Specifies the start time for the report.
E=hh Specifies the end time for the report.
/DAYS:n
Specifies the number of days of data to include in the specified report. This option is evaluated along with the start or end date specified with the /DATERANGE option. For example, this value specifies the number of days included in the report after the specified start date, or before the specified end date. If both a start and end date are specified, this option has no effect. If the /DATERANGE option is not specified, this option directs Microsoft Operations Manager 2000 to generate a report for the number of previous days specified. The n variable can be from 1 to 999.
/SERVERS:'servers'
Specifies the names of the servers to include in the specified report. Separate multiple server names with a comma, and enclose server names in single quotation marks.
/DATASOURCE:DSN=dsn
Specifies the connection information for the database. The variable format is defined as follows:

DSN=dsn

For example, specify the following value to use the OnePoint DSN to connect to the database:

/DATASOURCE:DSN=OnePoint

If a database is not specified the last connected database is used.

/DESCRIPTION:{Y|N}
Specifies whether the description of the report is included in the generated report.
/FOREST:'fname'
Specifies the name of a forest to include in the specified report. You may also specify a forest by using the name of a domain belonging to that forest. Enclose forest or domain name in single quotation marks. This option applies to the following reports: AD Domain Controllers by Site, AD Extinct Attributes, AD Extinct Classes, AD Replication Topology by Domain Controller, AD Replication Topology by Site.
/DOMAINS:'domnameA' [,'domnameB']
Specifies the names of the domains to include in the specified report. Separate multiple domain names with a comma, and enclose user names in single quotation marks. This option applies to the following reports: AD Domain Controllers by Domain, AD Operations Masters by Computer, AD Operations Masters by Role, AD Operations Masters Best Practices
/USERS_INCLUDE:'user1' [,'user2']
Specifies the names of the users to include in the specified report. Separate multiple user names with a comma, and enclose user names in single quotation marks. This option applies to the following report:
/USERS_EXCLUDE:'user1' [,'user2']
Specifies the names of the users to exclude from the specified report. Separate multiple user names with a comma, and enclose user names in single quotation marks. This option applies to the reports listed in the /USERS_INCLUDE option above.
/TOP:<number> [PERCENT]
Applicable only for Top_CPU_Utilization, Top_Disk_Utilization and Top_Memory_Utilization reports. Limits the number of servers to be shown in the report. Servers with maximum measured value are shown.
/IP_ADDRESS_LIST:'label1=ipAddress1'[,'label2=ipAddress2']
Applicable only for IIS Events by Selected Client IP Address Summary report.

Example 1

To print the complete User Account Changes report that includes all user account changes, enter:

EEAREPT /PRINTBATCH User Account Changes /OUTPUT:P

Example 2

To save the complete User Account Changes report in HTML format in the default folder for HTML reports, enter:

EEAREPT /PRINTBATCH User Account Changes /OUTPUT:H

Example 3

To print the User Account Changes report for all user account changes that occurred in 1997, enter:

EEAREPT /PRINTBATCH User Account Changes /OUTPUT:P /DATERANGE:S=1997-01-01 E=1998-01-01

Example 4

To print the User Account Changes report for all user account changes that occurred in February, 1998, enter:

EEAREPT /PRINTBATCH User Account Changes /OUTPUT:P /DATERANGE:S=1998-02-01 /DAYS:28

Example 5

To print the User Account Changes report for all user account changes that occurred during the 60 days before and including March 1, 1998, enter:

EEAREPT /PRINTBATCH User Account Changes /OUTPUT:P /DATERANGE:E=1998-03-02 /DAYS:60

Example 6

To print two User Account Changes reports from a batch file, create and run a batch file that includes the following commands:

START /WAIT EEAREPT /PRINTBATCH Logon Violations by Time /OUTPUT:P /DATERANGE:S=1998-02-01 /DAYS:28 START /WAIT EEAREPT /PRINTBATCH User Account Changes /OUTPUT:P /DATERANGE:E=1998-03-02 /DAYS:60

Example 7

To print a top_xxx_utilization report using /TOP option:

START /WAIT EEAREPT /PRINTBATCH Top CPU Utilization /OUTPUT:P /DATERANGE:YESTERDAY /TOP:25 PERCENT

Example 8

Printing IIS Events by Selected Client IP Address Summary using /IP_ADDRESS_LIST option:

START /WAIT EEAREPT.exe /PRINTBATCH IIS Events by Selected Client IP Address Summary /OUTPUT:H /DESCRIPTION:Y /IP_ADDRESS_LIST:'machine1=157.54.2.72','machine2=157.60.253.97'