Skip to content

StackOverflowException with Update Manager PowerCLI and WMF v3

While doing some patchmanagement I faced an issue with the current Windows Management Framework 3.0 (WMF) and the VMware vSphere Update Manager PowerCLI 5.1. Everytime when i invoked one of the VMware.VumAutomation cmdlets the PowerShell crashed with an StackOverflowException:

Process is terminated due to StackOverflowException.

I couldn't locate the root cause, so i started to narrow down the problem with different operating system. After testing various systems i noticed that the problem only appears on Windows 7 Systems with WMF3 installed manually and Windows 8 Systems where WMF3 is installed by default.

To work around this issue you have to run PowerShell in compatibility Mode. Run PowerShell with the -version 2 argument:

%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -version 2

If you are running the Integrated Scripting Engine ISE V3, you can use this script by Bartek Bielawski to run scripts with PowerShell V2.

2 thoughts on “StackOverflowException with Update Manager PowerCLI and WMF v3”

  1. Thank you very much for sharing this. Although i have installed PowerCLI 5.1 R2 and VUM PowerCLI 5.1 I was not able to use Get-Compliance. Hope there will be a fix soon :)
    Have a great day

  2. Pingback: PowerCLI VUM 5.5: Get-baseline stackoverflow error | Salt * Wet * Bytes

Leave a Reply

Your email address will not be published. Required fields are marked *