Update-SCSMWorkflow
Updates workflow properties.
Syntax
Update-SCSMWorkflow
[-Workflow] <Workflow[]>
[-PassThru]
[-WhatIf]
[-Confirm]
[<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: | System.Management.Automation.SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | 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: | System.Management.Automation.SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | System.Management.Automation.SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | 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: | Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.Workflow[] |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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.