Get-SCSMWorkflowStatus
擷取 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
Get-SCSMWorkflowStatus Cmdlet 會擷取Service Manager中的工作流程狀態。
範例
範例 1:取得所有工作流程的狀態
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
這個指令會擷取所有工作流程的狀態。
範例 2:取得單一工作流程的狀態
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
此命令會擷取 ServiceManager.ActivityManagement.ActivityStatusChangedRule 工作流程的狀態。
範例 3:取得基礎活動的狀態
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
第一個命令會擷取 ServiceManager.ActivityManagement.ActivityStatusChangedRule 工作流程的狀態,然後將它儲存在$Status變數中。
第二個命令會擷取工作流程在 $Status 中的基礎活動狀態。
參數
-ComputerName
指定 System Center 資料存取服務執行所在的電腦名稱。 Credential參數中指定的使用者帳戶必須具有指定電腦的存取權限。
Type: | System.String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Credential
指定此 Cmdlet 用來連線到 System Center 資料存取服務執行所在伺服器的認證。 指定的使用者帳戶必須具有該伺服器的存取權限。
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
指定要擷取之工作流程物件的識別碼 (GUID)。
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.Configuration.ManagementPackRule
此指令程式會擷取工作流程的相關資訊。