I would like to get information about the Powershell Version which runs my custom Powershell Sensor.
Which Powershell version is used by PRTG when executing EXE/Script (custom) sensors?
Modified on 2025-06-10 13:14:34 +0200
Disclaimer:
The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.
The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.
You can use two very short scripts to gather information on the Powershell Sessions which execute your custom scripts on your computer.
Create a 'ps1' file in your Custom Sensors Folder of PRTG and enter this line:
write-host $Host.Version.Major,":OK ",$Host.Version.Major,".",$Host.Version.Minor
Create a Custom Sensor using the scriptfile you have just created. The script will return the version number of Powershell when executed.
To determine if the Powershell Session runs in a 32bit or 64bit environment create a script containing the following lines:
Create an EXE/Script sensor for the script you just created, and it will return the environment of the Powershell Session.
May, 2011 - Permalink