Hello, I have a custom exe running and for some reason I am getting unauthorized access. I have basically the same exe running on another sensor and it runs just fine. The only difference is that one is pointing to an actual server and the other is pointing to a windows 10 machine. I can run the script manually and it returns whats expected just fine. I have all the winrm setup correctly, just for some reason when prtg is calling the script it is denying it. I already have the probe service running as my domain admin account which was my problem the first time. Not sure whats going on here though. Any insight would be appreciated! Thanks!


Article Comments

Hello TDC,

  • To better understand what is currently configured, could you please elaborate what the script exactly does?
  • Do I understand you correctly that the working sensor also points to another machine than the remote probe host itself?
  • If you manually run the script, do you use the same user which is also configured to run the probe service?

Best regards, Felix


Jan, 2018 - Permalink

Its just a script that is reading a txt file remotely and returning a value. Yes one is pointing to a windows server and the other is the window 10 machine. I can manually run the script with the same account as the PRTG probe service and it returns successfully.

Invoke-Command -ComputerName "ClientName" -ScriptBlock {

$content = get-content "C:\Report\Output.txt"

$word = "yes!"

If($content -match $word)

{Write-Host 1:OK}

else

{Write-Host 0:OK}

}

Jan, 2018 - Permalink

Hi TDC,

Please check if you can run the script manually using the 32 bit (x86) version of powershell(not the x64)l. Does it work?

How do you enter the credentials when you run the script manually? In the input box appearing, or via command line parameters? Do the credentials include any special characters?

Best regards, Felix


Jan, 2018 - Permalink