Hello,
as far as i could find out, the powershell scripts used in custom xml sensors are executed on the prtg probe system in a 32-bit powershell. To use them for a remote system, the scripts needs to use ps remoting to get the data. But i couldn't find a clear statement under which user context these scripts are executed and how to authenticate against a remote system.
Is it correct that the powershell scripts are executed with the account which is used to run the probe service on the prtg probe server? So per default with LOCAL_SYSTEM?
If this is the case, what would be the best practice to authenticate in these scripts? Change the account used to start the prtg probe service, or supply the credentials to the script with the PRTG variables %windowsuser %windowspassword.
For the latter: Is it secure to supply credentials via the sensor parameters? Since i would have to supply the password in plain text, i would like to prevent this appearing in a log file or something like that.
Thanks a lot