Enable Workitem Event Workflow Configuration with powershell RRS feed

  • Question

  • Is there any powershell to command or syntax for the Update-SCSMWorkflow cmdlet to enable or disable a Workitem event workflow, such as an incident event, or service event workflow?

    Some of the workflows I am creating require manual editing of the XML.  This means that if it is not enabled you need to export the MP and enable it with XML and re-import.  Enabling via the console adversely modifies the XML itself and removes the manual edits.
    Thursday, July 17, 2014 8:41 PM


  • Doing a little more searching and with a little trial and error I was able to figure it out.


    PS C:\>$Workflow = Get-SCSMWorkflow "Workflow Name"
    PS C:\>$myWorkflow.Enabled = $FALSE
    PS C:\>Update-SCSMWorkflow $WorkFlow

    I my case I wanted to avoid changing an incorrect Workflow so I filtered a little more to include the MP name

    Get-SCSMWorkflow "Workflow Name" | ?{$_.ManagementPackName -eq "ManagementPack name"}

    • Marked as answer by Misha Rudiy Friday, July 18, 2014 2:46 PM
    Friday, July 18, 2014 2:46 PM