Share via


Remove-SCSMDCMWorkflow

Remove-SCSMDCMWorkflow

Removes a DCM workflow from Service Manager.

Syntax

Parameter Set: Default
Remove-SCSMDCMWorkflow [-Workflow] <DCMWorkflow[]> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

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

Parameters

-Workflow<DCMWorkflow[]>

Specifies instances of DCM workflows.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

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.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow

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

Outputs

The output type is the type of the objects that the cmdlet emits.

  • None.

    This cmdlet does not generate any output.

Examples

Example 1: Remove a workflow

This example removes a DCM 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*"

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

Get-SCSMDCMWorkflow

New-SCSMDCMWorkflow

Update-SCSMDCMWorkflow