Score:0

PRTG PowerShell Remoting Requirements for Custom EXE/Script Advanced Sensor

kh flag

I've created a script for checking the TLS certificate assigned to an SMTP Relay server which supports SMTPS. The code is available here if that's of interest.

The documentation says that powershell remoting is required on the target machine... but it's not clear what's meant by target; i.e. is that:

  • The PRTG Core Server
  • The PRTG Probe Server on which the sensor is configured
  • All PRTG Probe Servers
  • The Device being monitored

My guess is that it's the device being monitored; but I don't want the script to be run on that device; I want it to be run on the probe but for its result to show under the device (i.e. as I want to show the results when a client connects to the remote service, as part of the purpose of the sensor is to show the port is available externally).

Questions:

  • Could you confirm what servers require remoting to be enabled?
  • If the script is run on the device under which the probe's configured, is there a way to change this behaviour so I can run it from the probe whilst having the result show against the target device?
kh flag
Update: It looks like it's required on [the probe](https://kb.paessler.com/en/topic/84546-exe-script-sensor-powershell-not-running-on-remote-system#reply-295368). That said, it feels a bit odd as I'd assume the probe is running a PRTG service, so could just run the command locally, rather than requiring the core to push the command to it.
kh flag
Note also - lots more useful info here: turns out the execution policy depends on whether you're using PSx64 or PSx86; and PRTG uses the x86 version. To fix that, run `%SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe` in an elevated session, then `if (([int](Get-ExecutionPolicy)) -gt 1) {Set-ExecutionPolicy RemoteSigned -Force}` to make the policy more permissive where required. https://kb.paessler.com/en/topic/71356-guide-for-powershell-based-custom-sensors
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.