Share via


Remove-SCSMDCMWorkflow

Removes a DCM workflow from Service Manager.

Syntax

Default (Default)

Remove-SCSMDCMWorkflow
    [-Workflow] <DCMWorkflow[]>
    [-WhatIf]
    [-Confirm]
    [<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.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Workflow

Specifies instances of DCM workflows.

Parameter properties

Type:

Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

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.