Update-SCSMWorkflow
Updates workflow properties.
Syntax
Default (Default)
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.
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 |
-PassThru
Indicates that this cmdlet returns the workflow that it updates. You can pass this object to other cmdlets.
Parameter properties
| Type: | System.Management.Automation.SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
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 a workflow object that this cmdlet updates. To obtain a workflow, use the Get-SCSMWorkflow cmdlet.
Parameter properties
| Type: | Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.Workflow[] |
| 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.Workflow
You can pipe a workflow object to the Workflow parameter.
Outputs
None.
This cmdlet does not generate any output.