0

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?
JohnLBevan
  • 1,214
  • 7
  • 22
  • 46
  • 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. – JohnLBevan Nov 24 '22 at 08:31
  • 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 – JohnLBevan Nov 24 '22 at 17:55

0 Answers0