次の方法で共有


Get-SCSMWorkflow

Service Manager ワークフローの構成情報を取得します。

構文

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

説明

Get-SCSMWorkflow コマンドレットは、Service Managerワークフローの構成情報を取得します。

例 1: ワークフロー構成を取得する

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

このコマンドは、ワークフロー構成を取得します。

例 2: アクティビティ イベント ワークフロー構成を取得する

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

次の使用例は、"アクティビティの状態が変更されました" ワークフローの構成を取得します。

例 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

これらのコマンドは、"サービス要求アクティビティの再実行" ワークフローの詳細を表示します。

例 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

次の使用例は、"子インシデントの解決 (親インシデント作成)" ワークフローの構成の詳細を取得します。

例 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

この例では、"Desired Configuration Management Rule Update" ワークフローの構成の詳細を取得します。

パラメーター

-ComputerName

System Center データ アクセス サービスが実行しているコンピューターの名前を指定します。

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

-Credential

System Center Data Access サービスが実行されているサーバーへの接続にこのコマンドレットが使用する資格情報を指定します。 指定するユーザー アカウントには、そのサーバーへのアクセス権が必要です。

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

-DisplayName

取得するワークフロー構成の表示名を指定します。 正規表現を指定できます。

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

-Id

取得するワークフロー構成の ID を指定します。

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

-Name

取得するワークフロー構成の名前を指定します。 正規表現を指定できます。

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

-SCSession

Service Manager 管理サーバーへのセッションを表すオブジェクトを指定します。

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

入力

System.String

名前を DisplayName パラメーターにパイプできます。

System.Guid

GUID を Id パラメーターにパイプできます。

出力

Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.Workflow

このコマンドレットは、ワークフローに関する情報を取得します。