Looking back at the beginning of this thread, I noticed that where it fails PowerShell is called with
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Could the one that works perhaps have picked up
%SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe
Would that make a difference?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference