Hello,
i use powershell to write some Sensors (XML Custom EXE/Script Sensors) for vmware and windows. Lately i noticed some of my Sensors are throwing errors.
Normally i use the features: x Use Windows credentials of parent device x Set placeholders as environment values to pass Parameter to my Scripts and execute them with the rights of the parents windows credentials.
When i now use this command : "User: $($env:UserName)" | Out-File -FilePath C:\tmp\Test_log.txt i will allways get $PRTG as user anyway if i use the which option i use. It also seems hat there are no Parameters passed to the Script.
Config: Windows Server 2019 PSVersion 5.1.17763.1007 PRTG Currently Installed Version 20.3.60.1623+
What i have tried: - Delete Senor and create new one - Reboot Server - Reinstall vmware.powercli - several experiments with the Setting "Use Windows credentials of parent device" and "Set placeholders as environment values" - Export $args[] and $env:UserName to a logfile - Settings Windows Creds directly in the parent device ("Credentials for Windows Systems ")
Any Hints to solve the Problem?
best regards Heiko
Article Comments
ups not my day:
the core services uses a domain admin account. when changing the probe account all my custom sensors fails with: A required privilege is not held by the client. (0x522)
there are also some hints from your team to start the probe with a local account: https://helpdesk.paessler.com/en/support/solutions/articles/87470-exe-script-sensor:-error-0x522
sorry or the confusing. still trying to investigate
best regard heiko
Mar, 2021 - Permalink
Hello Heiko,
do you have more luck if you use the parameter option instead of environmental variables?
Via Setup / System Administration / Monitoring, you can enable the new Powershell wrapper (section "Experimental Features") which protects parameter from being read by the Windows Event Log, or Process Explorer.
Mar, 2021 - Permalink
Hi Heiko,
Did you already try to run the PRTG Probe Service as an administrative user account in Windows?
Kind regards,
Felix Saure, Tech Support Team
Jul, 2020 - Permalink