Get-SCSMWorkflow
Retrieves configuration information for Service Manager workflows.
Syntax
FromDisplayName (Default)
Get-SCSMWorkflow
[[-DisplayName] <String[]>]
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[<CommonParameters>]
FromId
Get-SCSMWorkflow
[-Id] <Guid[]>
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[<CommonParameters>]
FromName
Get-SCSMWorkflow
[-Name] <String[]>
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[<CommonParameters>]
Description
The Get-SCSMWorkflow cmdlet retrieves configuration information for Service Manager workflows.
Examples
Example 1: Get workflow configuration
PS C:\>Get-SCSMWorkflow
Enabled DisplayName ManagementPackName
------- ----------- ------------------
True New Service Request Workflow ServiceManager.ServiceRequest.Library
True Service Request Status Changed ServiceManager.ServiceRequest.Library
True Resolve Incident Workflow ServiceManager.ProblemManagement.Library
True Dependent Activity Status ServiceManager.ActivityManagement.Library
True Resolve Child Incidents (Parent Incident resolved) ServiceManager.IncidentManagement.Library
This command retrieves the workflow configuration.
Example 2: Get the Activity Event Workflow Configuration
PS C:\>Get-SCSMWorkflow "Activity Status Changed"
Enabled DisplayName ManagementPackName
------- ----------- ------------------
True Activity Status Changed ServiceManager.ReleaseManagement.Library
True Activity Status Changed ServiceManager.ChangeManagement.Library
True Activity Status Changed ServiceManager.ServiceRequest.Library
This example retrieves the configuration of the " Activity Status Changed" workflow.
EXAMPLE 3
PS C:\>$wf = Get-SCSMWorkflow "Service Request Activity Rerun"
DisplayName : Service Request Activity Rerun
Description : Service Request Activity Rerun
Enabled : True
Event : Update
ManagementPack : [ServiceManager.ServiceRequest.Library, 9396306c2be7fcc4, 7.5.1088.248]
Criteria : <Criteria>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property
State="Pre">$Context/Property[Type='CoreActivity!System.WorkItem.Activity']/Status$</Property
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value>$MPElement[Name="CoreActivity!ActivityStatusEnum.Rerun"]$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property
State="Post">$Context/Property[Type='CoreActivity!System.WorkItem.Activity']/Status$</Property
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>$MPElement[Name="CoreActivity!ActivityStatusEnum.Rerun"]$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</Criteria>
Template :
EnableNotification : False
Notification : {}
WorkflowSubscription :
Microsoft.EnterpriseManagement.Subscriptions.WorkflowSubscriptionManagementPackName :
ServiceManager.ServiceRequest.Library
These commands display the details of the "Service Request Activity Rerun" workflow.
EXAMPLE 4
PS C:\>$wf = Get-SCSMWorkflow "Resolve Child Incidents (Parent Incident created)"
DisplayName : Resolve Child Incidents (Parent Incident created)
Description : Resolve Child Incidents when Parent Incident is created as resolved
Enabled : True
Event : Create
ManagementPack : [ServiceManager.IncidentManagement.Library, 9396306c2be7fcc4, 7.5.1088.248]
Criteria : <Criteria>
<Expression>
<SimpleExpression>
<ValueExpression>
<Property State="Post">$Context/Property[Type='CoreIncident!System.WorkItem.Incident']/S
tatus$</Property>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>$MPElement[Name="CoreIncident!IncidentStatusEnum.Resolved"]$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Criteria>
Template :
EnableNotification : False
Notification : {}
WorkflowSubscription : Microsoft.EnterpriseManagement.Subscriptions.WorkflowSubscription
ManagementPackName : ServiceManager.IncidentManagement.Library
This example retrieves the configuration details of the "Resolve Child Incidents (Parent Incident created)" workflow.
EXAMPLE 5
PS C:\>$wf = Get-SCSMWorkflow "Desired Configuration Management Rule Update"
DisplayName : Desired Configuration Management Rule Update
Description : Desired Configuration Management Rule Update
Enabled : True
Event : Update
ManagementPack : [ServiceManager.IncidentManagement.Library, 9396306c2be7fcc4, 7.5.1088.248]
Criteria :
Template :
EnableNotification : False
Notification : {}
WorkflowSubscription :
Microsoft.EnterpriseManagement.Subscriptions.WorkflowSubscription
ManagementPackName : ServiceManager.IncidentManagement.Library
This example retrieves the configuration details of the " Desired Configuration Management Rule Update" workflow.
Parameters
-ComputerName
Specifies the name of the computer on which the System Center Data Access service runs.
Parameter properties
Type: | System.String[] |
Default value: | Localhost |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | System.Management.Automation.PSCredential |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-DisplayName
Specifies the display name of the workflow configuration to retrieve. You can specify a regular expression.
Parameter properties
Type: | System.String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
FromDisplayName
Position: | 0 |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Id
Specifies the ID of the workflow configuration to retrieve.
Parameter properties
Type: | System.Guid[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
FromId
Position: | 0 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
Specifies the name of the workflow configuration to retrieve. You can specify a regular expression.
Parameter properties
Type: | System.String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
FromName
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SCSession
Specifies the object that represents the session to a Service Manager management server.
Parameter properties
Type: | Microsoft.SystemCenter.Core.Connection.Connection[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
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.ServiceManager.Sdk.Workflows.Workflow
This cmdlet retrieves information about workflows.