次の方法で共有


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

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

型:System.Management.Automation.SwitchParameter
Aliases:cf
配置:Named
規定値:False
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-PassThru

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

型:System.Management.Automation.SwitchParameter
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-WhatIf

コマンドレットを実行した場合の動作を示します。 コマンドレットは実行されません。

型:System.Management.Automation.SwitchParameter
Aliases:wi
配置:Named
規定値:False
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-Workflow

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

型:Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow[]
配置:0
規定値:None
必須:True
パイプライン入力を受け取る:True
ワイルドカード文字を受け取る:False

入力

Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow

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

出力

None.

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