[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Represents a console task definition.

Schema Hierarchy

ManagementPack
  Presentation
    ConsoleTasks
      ConsoleTask

Syntax

Xml
<ConsoleTask ID=”ConsoleTaskID” Comment=”Comment” Accessibility=”Public/Internal” Enabled=”True/False” Target=”TargetID” RequireOutput=”True/False”>   <Criteria>Xpath</Criteria>
   <Assembly>assembly resource ID</Assembly>
   <Handler>handler</Handler>
   <Parameters>…</Parameters>
</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 entity type.

RequireOutput

Required attribute. Signifies whether or not the application should write to standard output.

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.

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

Criteria (ConsoleTask)

Optional element. An XPath expression that allows for restrictions on when the console task is available.

Assembly

Required element. Refers to the ID of an assembly resource that contains the specified handler for a console task.

Handler

Required element. Refers to the handler that is to be called from inside the specified assembly resource.

Parameters

Optional element. Contains the arguments to be passed to the handler.

Parent Elements

Element Description

ConsoleTasks

Contains console task definitions in a management pack.

Remarks

A console task runs on the computer that is hosting the Service Manager console. Its target can be any element that the user can focus on from within the console, such as a folder or a view. In addition to specifying a target, you can specify criteria that allow the console task to target element instances that have specific attribute or element values. The criteria element value is an XPath expression over the serialized representation of the targeted class type.

Example

The following sample XML sample shows a console task that launches the help file for Service Manager Administration. Because the task is targeted at the Administration folder, it will be available in the user interface only when the user clicks on that folder.

  Copy Code
<ConsoleTask ID="ConsoleTask.HelpAdministration" Accessibility="Public" Enabled="true" Target="Administration!Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.Folder" RequireOutput="true">
  <Assembly>SMConsole!SdkDataAccessAssembly</Assembly>
  <Handler>Microsoft.EnterpriseManagement.UI.SdkDataAccess.HelpTaskHandler</Handler>
  <Parameters>
	<Argument Name="Command">OpenCHM</Argument>
	<Argument Name="Topic">html/80cecd71-e698-43ec-938d-851c387445af.htm</Argument>
  </Parameters>
</ConsoleTask>

The following sample XML shows a console task that specifies a target class type and also supplies criteria for the targeted class. This console task will be available only when the Value attribute of the Enabled element is set to true.

  Copy Code
<ConsoleTask ID="Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.Task.DisableADConnector" Target="ADConnector!System.LinkingFramework.ActiveDirectorySource" Accessibility="Public" RequireOutput="false">
  <Criteria>/Microsoft.SystemCenter.Connector/Enabled/@Value='True'</Criteria>
  <Assembly>Console!SdkDataAccessAssembly</Assembly>
  <Handler>Microsoft.EnterpriseManagement.UI.SdkDataAccess.ConsoleTaskHandler</Handler>
  <Parameters>
	<Argument Name="Assembly">Microsoft.EnterpriseManagement.ServiceManager.UI.Administration</Argument>
	<Argument Name="Type">Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.Connectors.Common.ConnectorTaskHandler</Argument>
	<Argument>Disable</Argument>
  </Parameters>
</ConsoleTask>

The serialized representation of the Microsoft.SystemCenter.Connector class type appears in the following manner:

  Copy Code
<Microsoft.SystemCenter.Connector Id="d5c10334-535e-219d-bd53-3fb95bb64d3f" Name="27320aef-a133-498b-82cf-c505acd61f89" Path="" FullName="Microsoft.SystemCenter.Connector:27320aef-a133-498b-82cf-c505acd61f89" DisplayName="AD " LastModified="4/29/2010 9:51:14 PM" Role="" RelationshipType="">
  <Id Value="27320aef-a133-498b-82cf-c505acd61f89" Class="Microsoft.SystemCenter.Connector" SystemType="System.String" Type="string"></Id>
  <Name Value="ADConnector.5f845844d3ea453eaa9f7bb032c60a69" Class="Microsoft.SystemCenter.Connector" SystemType="System.String" Type="string"></Name>
  <Description Value="" Class="Microsoft.SystemCenter.Connector" SystemType="System.String" Type="string"></Description>
  <DiscoveryDataIsManaged Value="" Class="Microsoft.SystemCenter.Connector" SystemType="System.Boolean" Type="bool"></DiscoveryDataIsManaged>
  <DiscoveryDataIsShared Value="" Class="Microsoft.SystemCenter.Connector" SystemType="System.Boolean" Type="bool"></DiscoveryDataIsShared>
  <FQDN Value="redmond.corp.microsoft.com" Class="System.LinkingFramework.ActiveDirectorySource" SystemType="System.String" Type="string"></FQDN>
  <UserList Value="" Class="System.LinkingFramework.ActiveDirectorySource" SystemType="System.String" Type="string"></UserList>
  <PrinterList Value="" Class="System.LinkingFramework.ActiveDirectorySource" SystemType="System.String" Type="string"></PrinterList>
  <ComputerList Value="" Class="System.LinkingFramework.ActiveDirectorySource" SystemType="System.String" Type="string"></ComputerList>
  <GroupList Value="fa9619141a396144b7cc144667adf811,Exchange 2010 - Corp Org Admins" Class="System.LinkingFramework.ActiveDirectorySource" SystemType="System.String" Type="string"></GroupList>
  <SolutionName Value="" Class="System.LinkingFramework.DataSource" SystemType="System.String" Type="string"></SolutionName>
  <DataProviderName Value="ADConnector" Class="System.LinkingFramework.DataSource" SystemType="System.String" Type="string"></DataProviderName>
  <DataProviderDisplayName Value="Active Directory" Class="System.LinkingFramework.DataSource" SystemType="System.String" Type="string"></DataProviderDisplayName>
  <ReaderProfileName Value="Microsoft.SystemCenter.DatabaseWriteActionAccount" Class="System.LinkingFramework.DataSource" SystemType="System.String" Type="string"></ReaderProfileName>
  <DatawarehouseProfileName Value="" Class="System.LinkingFramework.DataSource" SystemType="System.String" Type="string"></DatawarehouseProfileName>
  <Reserved Value="" Class="System.LinkingFramework.DataSource" SystemType="System.String" Type="string"></Reserved>
  <ImpersonationEnabled Value="True" Class="System.LinkingFramework.DataSource" SystemType="System.Boolean" Type="bool"></ImpersonationEnabled>
  <SyncType Value="SyncTypeEnum.Hours" Class="System.LinkingFramework.DataSource" SystemType="System.Enum" Type="enum"></SyncType>
  <SyncInterval Value="1" Class="System.LinkingFramework.DataSource" SystemType="System.Int32" Type="int"></SyncInterval>
  <SyncTime Value="4/29/2010 9:50:20 PM" Class="System.LinkingFramework.DataSource" SystemType="System.DateTime" Type="datetime"></SyncTime>
  <SyncNow Value="True" Class="System.LinkingFramework.DataSource" SystemType="System.Boolean" Type="bool"></SyncNow>
  <Enabled Value="False" Class="System.LinkingFramework.DataSource" SystemType="System.Boolean" Type="bool"></Enabled>
  <DisplayName Value="AD " Class="System.Entity" SystemType="System.String" Type="string"></DisplayName>
  <Microsoft.SystemCenter.LinkingFramework.SyncStatus Id="f620a977-7091-71de-8c25-a20d2f2d409c" Name="" Path="27320aef-a133-498b-82cf-c505acd61f89" FullName="Microsoft.SystemCenter.LinkingFramework.SyncStatus:27320aef-a133-498b-82cf-c505acd61f89" DisplayName="Microsoft.SystemCenter.LinkingFramework.SyncStatus" LastModified="4/29/2010 9:51:14 PM" Role="SyncStatus" RelationshipType="Microsoft.SystemCenter.LinkingFramework.DataSourceHostSyncStatus">
	<LastRunStartTime Value="" Class="Microsoft.SystemCenter.LinkingFramework.SyncStatus" SystemType="System.DateTime" Type="datetime"></LastRunStartTime>
	<LastRunFinishTime Value="" Class="Microsoft.SystemCenter.LinkingFramework.SyncStatus" SystemType="System.DateTime" Type="datetime"></LastRunFinishTime>
	<Status Value="Microsoft.SystemCenter.LinkingFramework.SyncStatusEnum.NeverRun" Class="Microsoft.SystemCenter.LinkingFramework.SyncStatus" SystemType="System.Enum" Type="enum"></Status>
	<SyncPercent Value="0" Class="Microsoft.SystemCenter.LinkingFramework.SyncStatus" SystemType="System.Int32" Type="int"></SyncPercent>
	<MaxValue Value="100" Class="Microsoft.SystemCenter.LinkingFramework.SyncStatus" SystemType="System.Int32" Type="int"></MaxValue>
	<MinValue Value="0" Class="Microsoft.SystemCenter.LinkingFramework.SyncStatus" SystemType="System.Int32" Type="int"></MinValue>
	<DisplayName Value="Microsoft.SystemCenter.LinkingFramework.SyncStatus" Class="System.Entity" SystemType="System.String" Type="string"></DisplayName>
	<Id Value="27320aef-a133-498b-82cf-c505acd61f89" Class="Microsoft.SystemCenter.Connector" SystemType="System.String" Type="string"></Id>
  </Microsoft.SystemCenter.LinkingFramework.SyncStatus>
</Microsoft.SystemCenter.Connector>

See Also