Get-SCSMWorkflowStatus

Retrieves the status of workflows in Service Manager.

Syntax

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

Description

The Get-SCSMWorkflowStatus cmdlet retrieves the status of workflows in Service Manager.

Examples

Example 1: Get the status of all workflows

C:\PS>Get-SCSMWorkflowStatus
Name                                                                   ManagementPackName                               Sealed Enabled TimeAdded
----                                                                   ------------------                               ------ ------- ---------
ServiceManager.IncidentManagement.ParentIncidentActivated.UpdateRule   ServiceManager.IncidentManagement.Library        True   true    8/8/2011 7:00:54 PM
ServiceManager.ActivityManagement.ActivityStatusChangedRule            ServiceManager.ActivityManagement.Library        True   true    8/8/2011 6:59:27 PM
ServiceManager.ServiceRequest.Library.Rule.ActivityRerun               ServiceManager.ServiceRequest.Library            True   true    8/8/2011 7:04:54 PM
ServiceManager.ActivityManagement.ReviewerDeletedRule                  ServiceManager.ActivityManagement.Library        True   true    8/8/2011 6:59:27 PM
ServiceManager.ActivityManagement.ActivityAddedRule                    ServiceManager.ActivityManagement.Library        True   true    8/8/2011 6:59:27 PM
ServiceManager.ChangeManagement.ChangeRequestStatusChangedRule         ServiceManager.ChangeManagement.Library          True   true    8/8/2011 7:00:01 PM
ServiceManager.IncidentManagement.ParentIncidentResolved.UpdateRule    ServiceManager.IncidentManagement.Library        True   true    8/8/2011 7:00:54 PM
ServiceManager.ReleaseManagement.ActivityStatusChangedRule             ServiceManager.ReleaseManagement.Library         True   true    8/8/2011 7:00:24 PM
ServiceManager.ReleaseManagement.ActivityRerunRule                     ServiceManager.ReleaseManagement.Library         True   true    8/8/2011 7:00:24 PM
ServiceManager.ChangeManagement.ActivityStatusChangedRule              ServiceManager.ChangeManagement.Library          True   true    8/8/2011 7:00:01 PM
ServiceManager.ServiceRequest.Library.Rule.ServiceRequestStatusChanged ServiceManager.ServiceRequest.Library            True   true    8/8/2011 7:04:54 PM
ServiceManager.ReleaseManagement.ActivityAddedRule                     ServiceManager.ReleaseManagement.Library         True   true    8/8/2011 7:00:24 PM
ServiceManager.ActivityManagement.ReviewActivityActiveRule             ServiceManager.ActivityManagement.Library        True   true    8/8/2011 6:59:27 PM
ServiceManager.ActivityManagement.ActivitySkippedRule                  ServiceManager.ActivityManagement.Library        True   true    8/8/2011 6:59:27 PM
ServiceManager.ActivityManagement.ReviewerAddedRule                    ServiceManager.ActivityManagement.Library        True   true    8/8/2011 6:59:27 PM
ServiceManager.ProblemManagement.Library.Rule.ResolveIncident          ServiceManager.ProblemManagement.Library         True   true    8/8/2011 7:01:37 PM
ServiceManager.ReleaseManagement.NewReleaseRecordRule                  ServiceManager.ReleaseManagement.Library         True   true    8/8/2011 7:00:24 PM
ServiceManager.ActivityManagement.DependentActivityActiveRule          ServiceManager.ActivityManagement.Library        True   true    8/8/2011 6:59:27 PM
ServiceManager.ServiceRequest.Library.Rule.ActivityAdded               ServiceManager.ServiceRequest.Library            True   true    8/8/2011 7:04:54 PM
ServiceManager.ActivityManagement.DependentRelationshipCreatedRule     ServiceManager.ActivityManagement.Library        True   true    8/8/2011 6:59:27 PM
ServiceManager.ActivityManagement.ReviewActivityUpdatedRule            ServiceManager.ActivityManagement.Library        True   true    8/8/2011 6:59:27 PM
SSPModuleInvocationRule                                                ServiceManager.SoftwareDeployment.Configurations False  false   8/8/2011 7:05:21 PM
ServiceManager.IncidentManagement.ParentIncidentResolved.AddRule       ServiceManager.IncidentManagement.Library        True   true    8/8/2011 7:00:54 PM
ServiceManager.ChangeManagement.ActivityAddedRule                      ServiceManager.ChangeManagement.Library          True   true    8/8/2011 7:00:01 PM
ServiceManager.ActivityManagement.ReviewerVotedRule                    ServiceManager.ActivityManagement.Library        True   true    8/8/2011 6:59:27 PM
ServiceManager.ActivityManagement.ContainerActivityStatusAlertRule     ServiceManager.ActivityManagement.Library        True   true    8/8/2011 6:59:27 PM
ServiceManager.ReleaseManagement.ReleaseRecordStatusAlertRule          ServiceManager.ReleaseManagement.Library         True   true    8/8/2011 7:00:24 PM
ServiceManager.ServiceRequest.Library.Rule.ActivityStatusChanged       ServiceManager.ServiceRequest.Library            True   true    8/8/2011 7:04:54 PM
ServiceManager.ChangeManagement.ActivityRerunRule                      ServiceManager.ChangeManagement.Library          True   true    8/8/2011 7:00:01 PM
ServiceManager.ServiceRequest.Library.Rule.NewServiceRequest           ServiceManager.ServiceRequest.Library            True   true    8/8/2011 7:04:54 PM
ServiceManager.ChangeManagement.NewChangeRequestRule                   ServiceManager.ChangeManagement.Library          True   true    8/8/2011 7:00:01 PM
ServiceManager.ActivityManagement.DependentActivityStatusRule          ServiceManager.ActivityManagement.Library        True   true    8/8/2011 6:59:27 PM

This command retrieves the status of all workflows.

Example 2: Get the status of a single workflow

PS C:\>Get-SCSMWorkflowStatus -Name "ServiceManager.ActivityManagement.ActivityStatusChangedRule"
Name                                                        ManagementPackName                        Sealed Enabled TimeAdded
----                                                        ------------------                        ------ ------- ---------
ServiceManager.ActivityManagement.ActivityStatusChangedRule ServiceManager.ActivityManagement.Library True   true    12/2/2010 12:21:44 AM

This command retrieves the status of the ServiceManager.ActivityManagement.ActivityStatusChangedRule workflow.

Example 3: Get the status of underlying activities

PS C:\>$Status = Get-SCSMWorkflowStatus -Name "ServiceManager.ActivityManagement.ActivityStatusChangedRule"
PS C:\> $Status.GetStatus()
Status    TimeStarted           TimeFinished          Duration         RelatedObject
------    -----------           ------------          --------         -------------
Succeeded 12/2/2010 12:42:42 AM 12/2/2010 12:42:43 AM 00:00:00.1970000 RA3: Initial Screening

The first command retrieves the status of the ServiceManager.ActivityManagement.ActivityStatusChangedRule workflow, and then stores it in the $Status variable.

The second command retrieves the status of the underlying activities of the workflow in $Status.

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: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:PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

Specifies the display name of the workflow object to retrieve.

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

-Id

Specifies the unique ID of the workflow object to be retrieved.

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

-Name

Specifies the name of the workflow object to retrieve.

Type: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:Connection[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.String

You can pipe a workflow name to the DisplayName parameter.

System.Guid

You can pipe a GUID of a workflow object to the Id parameter.

Outputs

Microsoft.EnterpriseManagement.Configuration.ManagementPackRule

This cmdlet retrieves information about workflows.