Update-SCSMDCMWorkflow
汇报 DCM 工作流的属性。
语法
Update-SCSMDCMWorkflow
[-Workflow] <DCMWorkflow[]>
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
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 之前进行确认。
Type: | System.Management.Automation.SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
指示此 cmdlet 返回更新的工作流。 可以将此对象传递给其他 cmdlet。
Type: | System.Management.Automation.SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
显示在此 cmdlet 运行的情况下将会发生什么。 此 cmdlet 未运行。
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.
此 cmdlet 将不生成任何输出。