How to Create a Task
Updated: May 13, 2016
Applies To: System Center 2012 SP1 - Service Manager, System Center 2012 R2 Service Manager, System Center 2012 - Service Manager
Use the following procedures in System Center 2012 – Service Manager to create a task—for example, a task that you can use to open Event Viewer and view logs on a computer—and then validate the new task. Event Viewer displays the logs from the remote computer that is listed as a Configuration Item in the incident.
To create a task
In the Service Manager console, click Library.
On the Library pane, expand Library, and then select Tasks.
On the Tasks pane, select Create Task.
On the Before You Begin page, click Next.
On the General page, do the following:
In the Task name box, type a name for the task. For example, type Event Viewer.
In this release, if you edit and change any of the properties of a task, you have to close and reopen the console before you can view the task.
Next to the Target class area, click the ellipsis button (…).
In the Choose Class dialog box, in the Class list, click Incident, and then click OK.
In the Management pack list, make sure that Service Manager Incident Management Configuration Library is selected, and then click Next.
In this release, if you select the option to create a new management pack, you have to close and reopen the console before you can view this task.
On the Display Task by Category page, select the category where the task will be displayed. For example, select Incident Management Folder Tasks, and then click Next.
On the Command Line page, do the following:
In the Full path to command box, type the full path of the command you want to run with this task. For example, type %windir%\system32\eventvwr.exe.
In the Parameters area, click Insert Property.
In the Select Property dialog box, in the Related classes list, expand Incident, and then click Is Related to Configuration Item.
In the Available Properties box, type Computer Name.
Under Windows Computer, click NetBIOS Computer Name, and then click Add.
Optionally, select Log in action log when this task is run to add information to the incident action log when the task runs, and then click Next.
On the Summary page, click Create.
On the Completion page, observe that The new task was created successfully appears, and then click Close.
To validate a new task
In the Service Manager console, click Work Items.
In the Work Items pane, expand Work Items, expand Incident Management, and then click All Incidents.
In the All Incidents pane, click an incident for which a computer name has been entered as a configuration item.
In the Tasks pane, under the name of the incident you selected in the previous step, click Event Viewer.
Notice that Event Viewer starts, and the events from the computer that are associated with the incident are displayed.
You can use the Get-SCSMTask Windows PowerShell command to view Service Manager tasks.