Share via


ConsoleTask

Applies To: Operations Manager 2007 R2, System Center Operations Manager 2007

Represents a console task definition.

Schema Hierarchy

ManagementPack
  Presentation
    ConsoleTasks
      ConsoleTask

Syntax

<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>

Attributes and Elements

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.

RequireOutput Attribute Values

Value Description

True

The application is expected to write to standard output.

False

The application is not expected to write to standard output.

Category Attribute Values

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.

Accessibility Attribute Values

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

Application

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.

Parameters

Optional element. Contains the parameters to be sent to the application.

WorkingDirectory

Optional element. The working directory from which the application is to run.

Parent Elements

Element Description

ConsoleTasks

Contains console task definitions in a management pack.

Remarks

A ConsoleTask element, unlike a Task element, does not run on an agent computer. A console task runs on the computer that is hosting the Operations console. Typically, a console task launches an interactive application by using the context of the targeted ClassType element.

Example

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>

See Also

Reference

ConsoleTasks
Task