Update-SCSMDCMWorkflow

DCM ワークフローのプロパティを更新します。

構文

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

説明

Update-SCSMDCMWorkflow コマンドレットは、Desired Configuration Management (DCM) ワークフローのプロパティを更新します。

例 1: ワークフローの説明を変更する

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

この例では、DCM ワークフローの説明を変更します。

パラメーター

-Confirm

コマンドレットの実行前に確認を求めるメッセージが表示されます。

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

このコマンドレットによって、更新されたワークフローが返されることを示します。 このオブジェクトは、他のコマンドレットに渡すことができます。

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

コマンドレットの実行時に発生する内容を示します。 このコマンドレットは実行されません。

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Workflow

更新する DCM ワークフローのインスタンスを指定します。

Type:Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow[]
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

入力

Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow

DCM ワークフローを Workflow パラメーターに パイプ処理できます。

出力

None.

このコマンドレットは出力を生成しません。