I'm having issues running a custom EXE/Script sensor. It's a simple PowerShell script that's tested to return string output in the form of value:message.
Status summary of the sensor:
Response not wellformed: "(File C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\test.ps1 ca nnot be loaded because the execution of scripts is disabled on this system. Ple ase see "get-help about_signing" for more details. At line:1 char:157 + if ($PSVersionTable.PSVersion -ge (new-object 'Version' 5,0)) { Import-Module Microsoft.PowerShell.Management; Import-Module Microsoft.PowerShell.Utility};& <<<< 'C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\test.ps1' ; exit $LASTEXITCODE + CategoryInfo : NotSpecified: (:) [], PSSecurityException + FullyQualifiedErrorId : RuntimeException )" (code: PE132)
I also read somewhere that PRTG uses PowerShell 32bit when executing scripts so I've also verified profiles on both PowerShell and PowerShell (x86) on the target server are set to Unrestricted.
Also tried creating the custom sensor on another server that I've confirmed PowerShell execution policies on (unrestricted) and neither mine nor the demo scripts run (same error).
My PowerShell profile does not appear to be corrupt as I can remotely invoke powershell commands to my target server from other servers on the network and even from the PRTG server itself.
The Windows account being used is a domain admin.
I get the same exact issue/error when I setup a test sensor using the "Demo Powershell Script - Returns a fixed integer value.ps1".
Add comment