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