Get-SCSMWorkflowStatus
检索 Service Manager 中工作流的状态。
语法
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>]
说明
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 Data Access 服务的计算机的名称。 Credential 参数中指定的用户帐户必须具有对指定计算机的访问权限。
类型: | System.String[] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Credential
指定此 cmdlet 用于连接到运行 System Center Data Access 服务的服务器的凭据。 指定的用户帐户必须有权访问该服务器。
类型: | System.Management.Automation.PSCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DisplayName
指定要检索的工作流对象的显示名称。
类型: | System.String[] |
Position: | 0 |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-Id
指定要检索的工作流对象的 ID(GUID)。
类型: | System.Guid[] |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Name
指定要检索的工作流对象的名称。
类型: | System.String[] |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-SCSession
指定一个对象,该对象表示与 Service Manager 管理服务器的会话。
类型: | Microsoft.SystemCenter.Core.Connection.Connection[] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
输入
System.String
可以通过管道将工作流名称传递给 DisplayName 参数。
System.Guid
可以通过管道将工作流对象的 GUID 传递给 Id 参数。
输出
Microsoft.EnterpriseManagement.Configuration.ManagementPackRule
此 cmdlet 检索有关工作流的信息。