ConsoleTask
Updated: August 10, 2011
Applies To: Operations Manager 2007 R2, System Center Operations Manager 2007
Represents a console task definition.
<ConsoleTask ID=”ConsoleTaskID” Comment=”Comment” Accessibility=”Public/Internal” Enabled=”True/False” Target=”TargetID” RequireOutput=”True/False” Category=”Alert/MonitoringObject/Event”> <Application>application file path</Application> <Parameters>…</Parameters> <WorkingDirectory>working directory</WorkingDirectory> </ConsoleTask>
The following sections describe attributes, child elements, and the parent element of the ConsoleTask element.
Attributes
| Attribute | Description |
|---|---|
|
ID |
Required attribute. Represents the identity of the element. To learn how to identify your element in a management pack, see Element Identity and Namespace Conventions. |
|
Comment |
Optional attribute. Represents commentary by the management pack author. |
|
Enabled |
Required attribute. Defines whether or not this console task is by default enabled or disabled. |
|
Target |
Required attribute. The ID of the targeted class type. |
|
RequireOutput |
Required attribute. Signifies whether or not the application should write to standard output. |
|
Category |
Optional attribute. Defines whether or not this workflow will run for agentless monitoring. Default value is true. |
| Value | Description |
|---|---|
True | The application is expected to write to standard output. |
False | The application is not expected to write to standard output. |
| Value | Description |
|---|---|
Alert | The console task is associated with alerts and is visible in all alert views. |
MonitoringObject | The console task is associated with the targeted class type instance. It is visible anytime the targeted class type instance is visible. |
Event | The console task is associated with events and is visible in all event views. |
| Value | Description |
|---|---|
Public | Indicates that the module type definition is visible to external management packs. |
Internal | Indicates that the module type definition is not visible to external management packs. |
Child Elements
| Element | Description |
|---|---|
Required element. The file path of the application that the console task is to run. The path must be on the same computer as the console. | |
Optional element. Contains the parameters to be sent to the application. | |
Optional element. The working directory from which the application is to run. |
Parent Elements
| Element | Description |
|---|---|
Contains console task definitions in a management pack. |
The following sample XML sample illustrates a console task that launches the Computer Management MMC snap-in on the computer that is running the targeted health service.
<ConsoleTask ID="Microsoft.SystemCenter.HealthService.Compmgmt" Accessibility="Internal" Enabled="true" Target="SCLibrary!Microsoft.SystemCenter.HealthService" RequireOutput="false" Category="MonitoringObject">
<Application>%windir%\system32\mmc.exe</Application>
<Parameters>
<Parameter>%windir%\system32\compmgmt.msc</Parameter>
<Parameter>/computer:$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Parameter>
</Parameters>
<WorkingDirectory />
</ConsoleTask>