What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags

View all Tags

Which Powershell version is used by PRTG when executing EXE/Script (custom) sensors?



I would like to get information about the Powershell Version which runs my custom Powershell Sensor.

custom-script-exe custom-sensor exe-script-sensor powershell ps1

Created on May 16, 2011 2:30:40 PM by  Stefan Telser [Paessler Support] (50) 2 1

Last change on Mar 19, 2015 4:02:29 PM by  Martina Wittmann [Paessler Support]

2 Replies

Accepted Answer



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:

  if ([System.IntPtr]::Size -eq 8)
      write-host 64,":64bit Session"
      write-host 32,":32bit Session"

Create an EXE/Script sensor for the script you just created, and it will return the environment of the Powershell Session.

Created on May 16, 2011 2:39:12 PM by  Stefan Telser [Paessler Support] (50) 2 1

Last change on May 17, 2011 2:09:34 PM by  Daniel Zobel [Product Manager]



Created on May 19, 2011 2:33:02 PM by  Daniel Zobel [Product Manager]

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.