Remove-SCSMDCMWorkflow

從 Service Manager 移除 DCM 工作流程。

Syntax

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 前提示您確認。

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 不會產生任何輸出。