none
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?



    samedi 13 juillet 2019 16:57

Toutes les réponses

  • 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?

    dimanche 14 juillet 2019 09:18
  • What is specified in your registry key? We had to update this key after updating MIM.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\FIMAutomation\PowerShellVersion

    mardi 23 juillet 2019 09:46
  • PowerShell version is 4.0 and Version is 4.5.0.0

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

    • Modifié 2xTsei lundi 29 juillet 2019 12:45
    lundi 29 juillet 2019 12:43
  • Do your workflows run if you edit the registry key to Powershell Version = 2.0?
    vendredi 2 août 2019 06:49
  • Do your workflows run if you edit the registry key to Powershell Version = 2.0?
    Nope. Get same error.
    mardi 6 août 2019 07:11
  • 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"
    
    try{
    Add-PSSnapin FIMAutomation 
    Import-Module D:\FIMPowerShellModuleV2-1\FimPowerShellModule.psm1
    }catch{
    $_ | Out-File "filepath"
    }

    jeudi 22 août 2019 09:05