Get-SCSMTask

Retrieves tasks that are defined in Service Manager.

Syntax

Get-SCSMTask
   [[-DisplayName] <String[]>]
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCSMTask
   [-Id] <Guid[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCSMTask
   [-Name] <String[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]

Description

The Get-SCSMTask cmdlet retrieves tasks that are defined in Service Manager.

Examples

Example 1: Get all tasks associated with incidents

PS C:\>Get-SCSMTask -DisplayName "*incident*"
Enabled Category   Name                                                                description
------- --------   ----                                                                -----------
True    Alert      System.WorkItem.Incident.GeneralSettings.Task                       View or edit the general settings for incident management

True    Alert      System.WorkItem.Incident.ViewAlertDetailsCommand.Task               View alert details
True    Alert      Microsoft.EnterpriseManagement.ServiceManager.UI.Administration.... Create an Incident Resolver user role
True    Alert      System.WorkItem.Incident.ViewHealthStateCommand.Task                View the configuration item's health state
True    Alert      System.WorkItem.Incident.RequestUserInputCommand.Task               Request user input
True    Alert      ServiceManager.IncidentManagement.Library.Task.DesiredConfiguration Configure System Center Configuration Manager Desired Configuration... 
True    Alert      System.WorkItem.Incident.CreateIncidentforConfigItem.Task           Create an incident linked to the current item
True    Alert      System.WorkItem.Incident.ChangeStatusCommand.Task                   Change the incident status
True    Alert      System.WorkItem.Incident.ActivateIncidentCommand.Task               Activate the incident
True    Alert      ConsoleTask.HelpIncident                                            Service Manager Incident Management Help
True    Alert      System.WorkItem.Incident.AssignToMeCommand.Task                     Assign the incident to me
True    Alert      System.WorkItem.Incident.New.Task                                   Create an incident
True    Alert      ServiceManager.IncidentManagement.Library.Task.AutomaticIncident... Configure incident change workflows
True    Alert      System.WorkItem.Incident.EscalateIncidentCommand.Task               Escalate or transfer the incident
True    Alert      System.WorkItem.Incident.AssignCommand.Task                         Assign the incident to an analyst
True    Alert      System.WorkItem.Incident.PingComputerCommand.Task                   Ping related computers
True    Alert      System.WorkItem.Incident.ApplyTemplateCommand.Task                  Apply a template
True    Alert      System.WorkItem.Incident.RemoteComputerCommand.Task                 Remote desktop
True    Alert      System.WorkItem.Incident.CloseIncidentCommand.Task                  Close the incident
True    Alert      System.WorkItem.Incident.ResolveIncidentCommand.Task                Resolve the incident

This command retrieves all tasks that are associated with incidents.

Parameters

-ComputerName

Specifies the name of the computer on which the System Center Data Access service runs. The user account that is specified in the Credential parameter must have access rights to the specified computer.

Type:System.String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Credential

Specifies the credentials that this cmdlet uses to connect to the server on which the System Center Data Access service runs. The specified user account must have access rights to that server.

Type:System.Management.Automation.PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

Specifies the display name of the task object to retrieve.

Type:System.String[]
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Id

Specifies the ID of the task object to retrieve.

Type:System.Guid[]
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies the name of the task object to retrieve.

Type:System.String[]
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SCSession

Specifies an object that represents the session to a Service Manager management server.

Type:Microsoft.SystemCenter.Core.Connection.Connection[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.String

You can pipe a name to the DisplayName parameter.

System.Guid

You can pipe a GUID to the Id parameter.

Outputs

Microsoft.EnterpriseManagement.Configuration.ManagementPackConsoleTask

This cmdlet returns task objects.