New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


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

Votes:

0

Your Vote:

Up

Down

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

Votes:

0

Your Vote:

Up

Down

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"
    }
    else
    {
      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 [Paessler Support]



Votes:

0

Your Vote:

Up

Down

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



Please log in or register to enter your reply.


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.