共用方式為


Remove-SCSMDCMWorkflow

從 Service Manager 移除 DCM 工作流程。

語法

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

Description

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 之前,提示您進行確認。

類型:System.Management.Automation.SwitchParameter
別名:cf
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:System.Management.Automation.SwitchParameter
別名:wi
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

-Workflow

指定 DCM 工作流程的實例。

類型:Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow[]
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

輸入

Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow

您可以使用管線將 Service Manager DCM 工作流程傳送至 Workflow 參數。

輸出

None.

此 Cmdlet 不會產生任何輸出。