Share via


Update-SCSMWorkflow

Update-SCSMWorkflow

Updates workflow properties.

Syntax

Parameter Set: Default
Update-SCSMWorkflow [-Workflow] <Workflow[]> [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Update-SCSMWorkflow cmdlet updates workflow properties.

Parameters

-PassThru

Indicates that this cmdlet returns the workflow that it updates. You can pass this object to other cmdlets.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Workflow<Workflow[]>

Specifies a workflow object that this cmdlet updates. To obtain a workflow, use the Get-SCSMWorkflow cmdlet.

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.Workflow

    You can pipe a workflow object 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 criteria from a workflow

The first command gets the workflow named CustomWorkflow by using Get-SCSMWorkflow. The command stores the workflow in the $Workflow variable.

The second command assigns a value of $Null to the Criteria property. The command removes the criteria from the workflow.

The final command updates the workflow to the current value of $Workflow.

PS C:\>$Workflow = Get-SCSMWorkflow -DisplayName "CustomWorkflow"
PS C:\> $Workflow.Criteria = $Null
PS C:\> Update-SCSMWorkflow -Workflow $Workflow

Get-SCSMWorkflow

Get-SCSMWorkflowStatus

New-SCSMDCMWorkflow

Remove-SCSMWorkflow