Update-SCSMWorkflow

Updates workflow properties.

Syntax

Update-SCSMWorkflow [-Workflow] <Workflow[]> [-Confirm] [-PassThru] [-WhatIf] [<CommonParameters>]

Description

The Update-SCSMWorkflow cmdlet updates workflow properties.

Examples

Example 1: Remove criteria from a workflow

PS C:\>$Workflow = Get-SCSMWorkflow -DisplayName "CustomWorkflow"
PS C:\> $Workflow.Criteria = $Null
PS C:\> Update-SCSMWorkflow -Workflow $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.

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
-PassThru

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

Type:SwitchParameter
Required:False
Position:Named
Default value:None
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 a workflow object that this cmdlet updates. To obtain a workflow, use the Get-SCSMWorkflow cmdlet.

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

Inputs

Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.Workflow

You can pipe a workflow object to the *Workflow* parameter.

Outputs

None.

This cmdlet does not generate any output.