Upgraded to Powershell 3.0 (http://www.microsoft.com/en-us/download/details.aspx?id=34595) to use some of the new commands.

PS C:\Windows\system32> $Host.Version Major Minor Build Revision ----- ----- ----- -------- 3 0 -1 -1

PS C:\Windows\system32> Get-ExecutionPolicy RemoteSigned

32-bit powershell queried

Now all of my custom powershell scripts are returning "The handle is invalid. (0x6)". Dumping exe output does not create any files. Sounds like a problem with PRTG calling powershell?

Even a simple: Write-Output "<prtg>" is failing with the same error.

Any ideas? Thanks -Andrew


Article Comments

Hi,
may you try running the following command in cmd: C:\Windows\powershell.exe -Noninteractive -Command "&'"C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\YOUREXECUTABLE"';" Does that deliver the correct output?
Best regards


Nov, 2012 - Permalink

Hi,
please reboot the machine once again (even if there has been a reboot after the Powershell update), this should fix the issue.
Best regards


Nov, 2012 - Permalink

Hello Konstantin, I work with Andrew and he asked me to test these solutions. The second reboot did resolve the issue. I guess Microsoft needs to update their release notes to mention that.

Thanks for the help!


Dec, 2012 - Permalink

Hello Daryl,
we are finally suspecting that with the Powershell 3.0 update the environment variables weren't updated correctly (which then happened with the second reboot). This might have caused the issues.
Best regards


Dec, 2012 - Permalink