Update-SCSMDCMWorkflow

Updates properties of a DCM workflow.

Syntax

Update-SCSMDCMWorkflow
      [-Workflow] <DCMWorkflow[]>
      [-PassThru]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Update-SCSMDCMWorkflow cmdlet updates properties of a Desired Configuration Management (DCM) workflow.

Examples

Example 1: Change the description of a workflow

The first command gets workflows by using the Get-SCSMDCMWorkflow cmdlet. The command stores the workflow in the $Workflow variable.
PS C:\>$Workflow = Get-SCSMDCMWorkflow -DisplayName "Activity Event Workflow Configuration"

The second command assigns a new value to the **Description** property of $Workflow. 
PS C:\>$Workflow.Description = "This is a new description"

The third command passes the contents of $Workflow to the Format-List cmdlet by using the pipeline operator. The command displays the contents of $Workflow as a list. 
PS C:\>$Workflow | Format-List
DisplayName           : Activity Event Workflow Configuration
Description           : This is a new description
ConfigurationBaseLine : {}
Enabled               : False
ManagementPack        : [ServiceManager.IncidentManagement.Configuration] 
Template              : DefaultIncidentTemplate
EnableNotification    : True
Notification          : {System.Collections.Hashtable, System.Collections.Hashtable}

The final command updates the workflow to match the current value stored in $Workflow.
PS C:\>Update-SCSMDCMWorkflow -Workflow $Workflow

This example changes the description of a DCM workflow.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: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: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:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Workflow

Specifies the instance of a DCM workflow to update.

Type:DCMWorkflow[]
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow

You can pipe a DCM workflow to the Workflow parameter.

Outputs

None.

This cmdlet does not generate any output.