共用方式為


Update-SCSMDCMWorkflow

更新 DCM 工作流程的屬性。

語法

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

Description

Update-SCSMDCMWorkflow Cmdlet 會更新 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

在執行 Cmdlet 之前,提示您進行確認。

類型:System.Management.Automation.SwitchParameter
別名:cf
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

-PassThru

指出此 Cmdlet 會傳回其更新的工作流程。 您可以將這個物件傳遞至其他 Cmdlet。

類型:System.Management.Automation.SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:System.Management.Automation.SwitchParameter
別名:wi
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

-Workflow

指定要更新之 DCM 工作流程的實例。

類型:Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow[]
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

輸入

Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow

您可以使用管線將 DCM 工作流程傳送至 Workflow 參數。

輸出

None.

此 Cmdlet 不會產生任何輸出。