Remove-SCSMDCMWorkflow

Removes a DCM workflow from Service Manager.

Syntax

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

Description

The Remove-SCSMDCMWorkflow cmdlet removes a Desired Configuration Management (DCM) workflow from Service Manager.

Examples

Example 1: Remove a workflow

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*"

This example removes a DCM workflow.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Workflow

Specifies instances of DCM workflows.

Type:DCMWorkflow[]
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Inputs

Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow

You can pipe a Service Manager DCM workflow to the *Workflow* parameter.

Outputs

None.

This cmdlet does not generate any output.