Remove-SCSMDCMWorkflow

从Service Manager中删除 DCM 工作流。

语法

Remove-SCSMDCMWorkflow
      [-Workflow] <DCMWorkflow[]>
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

说明

Remove-SCSMDCMWorkflow cmdlet 从 Service Manager 中删除 Desired Configuration Management (DCM) 工作流。

示例

示例 1:删除工作流

The first command gets the workflows that match the specified display name by using the Get-SCSMDCMWorkflow cmdlet. The cmdlet displays the results. 
PS C:\>Get-SCSMDCMWorkflow -DisplayName "MyDCM*"
DisplayName   Description           Enabled
-----------   -----------           -------
MyDCMWorkflow This is a description False

The second command passes the results of the **Get-SCSMDCMWorkflow** cmdlet to the current cmdlet by using the pipeline operator. The command removes the workflow. 
PS C:\>Get-SCSMDCMWorkflow -DisplayName "MyDCM*" | Remove-SCSMDCMWorkflow 

The final command repeats the first command. The results show that the workflow has been deleted. 
PS C:\>Get-SCSMDCMWorkflow -DisplayName "MyDCM*"

此示例删除 DCM 工作流。

参数

-Confirm

提示你在运行 cmdlet 之前进行确认。

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

显示在此 cmdlet 运行的情况下将会发生什么。 此 cmdlet 未运行。

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Workflow

指定 DCM 工作流的实例。

Type:Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow[]
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

输入

Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow

可以通过管道将 Service Manager DCM 工作流传递给 Workflow 参数。

输出

None.

此 cmdlet 将不生成任何输出。