Update-SCSMDCMWorkflow
Uppdaterar egenskaperna för ett DCM-arbetsflöde.
Syntax
Update-SCSMDCMWorkflow
[-Workflow] <DCMWorkflow[]>
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Update-SCSMDCMWorkflow cmdlet uppdaterar egenskaperna för ett DCM-arbetsflöde (Desired Configuration Management).
Exempel
Exempel 1: Ändra beskrivningen av ett arbetsflöde
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
I det här exemplet ändras beskrivningen av ett DCM-arbetsflöde.
Parametrar
-Confirm
Uppmanar dig att bekräfta innan du kör cmdleten.
Typ: | System.Management.Automation.SwitchParameter |
Alias: | cf |
Position: | Named |
Standardvärde: | False |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-PassThru
Anger att den här cmdleten returnerar det arbetsflöde som uppdateras. Du kan skicka det här objektet till andra cmdletar.
Typ: | System.Management.Automation.SwitchParameter |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-WhatIf
Visar vad som skulle hända om cmdleten körs. Cmdleten körs inte.
Typ: | System.Management.Automation.SwitchParameter |
Alias: | wi |
Position: | Named |
Standardvärde: | False |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Workflow
Anger instansen av ett DCM-arbetsflöde som ska uppdateras.
Typ: | Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow[] |
Position: | 0 |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
Indata
Microsoft.EnterpriseManagement.ServiceManager.Sdk.Workflows.DCMWorkflow
Du kan skicka ett DCM-arbetsflöde till parametern Workflow.
Utdata
None.
Den här cmdleten genererar inga utdata.