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.

  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

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trackbacks and Pingbacks: