Hotfix MIM SP1 ==> 4.4.1302.0 to 4.5.412.0 | FIMAutomation with PowerShell Activity from CodePlex generates postprocessingerrors RRS feed

  • Question

  • We updated MIM from 4.4.1302.0 to 4.5.412.0. After that all our workflows containing powershells generates postprocessingerrros.

    We are using PowerShell Activity from CodePlex to run powershells inside the workflows.

    I have inspected the problem and seems that forexample this kind of powershell works:

    "testing" > c:\temp\MIM_output.txt

    But all the workflows containing powershells using these fails:

    Add-PSSnapin FIMAutomation 
    Import-Module D:\FIMPowerShellModuleV2-1\FimPowerShellModule.psm1

    Add-PSSnapin FIMAutomation section gives this in EventViewer:

    System.InvalidOperationException: Exception of type 'Microsoft.ResourceManagement.Workflow.WorkflowExtensionException' was thrown.
       at FimExtensions.FimActivityLibrary.PowerShellActivity.Execute(ActivityExecutionContext context)
       at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)
       at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)
       at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
       at System.Workflow.Runtime.Scheduler.Run()
    I have really a no idea what to do next. Can anyone help?

    Saturday, July 13, 2019 4:57 PM

All replies

  • It seems that the problem is somehow related to powershell version. I made some test where I started powershell version sessio 3 inside the workflow and run the script from a specified file. That worked.

    So I am wondering what is the effect of updating NET framework to 4.6 which is needed for this hotfix?

    Sunday, July 14, 2019 9:18 AM
  • What is specified in your registry key? We had to update this key after updating MIM.


    Tuesday, July 23, 2019 9:46 AM
  • PowerShell version is 4.0 and Version is

    And I also tested that it is the hotfix itself which breaks the system, not the NET framework.

    • Edited by 2xTsei Monday, July 29, 2019 12:45 PM
    Monday, July 29, 2019 12:43 PM
  • Do your workflows run if you edit the registry key to Powershell Version = 2.0?
    Friday, August 2, 2019 6:49 AM
  • Do your workflows run if you edit the registry key to Powershell Version = 2.0?
    Nope. Get same error.
    Tuesday, August 6, 2019 7:11 AM
  • Sorry I was gone for holidays. Could you resolve your issue?

    If not:

    Can you try surrounding your powershell commands 

    Add-PSSnapin FIMAutomation 
    Import-Module D:\FIMPowerShellModuleV2-1\FimPowerShellModule.psm1

    within a try/catch with an export to file and report the thrown error please?

    $erroractionpreference = "Stop"
    Add-PSSnapin FIMAutomation 
    Import-Module D:\FIMPowerShellModuleV2-1\FimPowerShellModule.psm1
    $_ | Out-File "filepath"

    Thursday, August 22, 2019 9:05 AM