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

PowerShell 7

Votes:

0

I would like to use PowerShell 7.XX instaed of PowerShell 5.XX

Is there anyway that i can force PRTG "PwerShellScriptRunner" to use PS 7 ?

I have already treid the following: - I have installed PS 7 x86 and insterede the path in the environment variables in Windows.

I have already found a solution that i run my script with a .bat file. Please see the solution below from this site

https://www.msxfaq.de/tools/prtg/prtgcustomsensor.htm

"C:\Program Files\PowerShell\7\pwsh.exe" ^
   -nologo ^
   -NonInteractive ^
   -command "& ""C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\get-fritzmactable.ps1"" -FBKennwort:""geheimeskennwort"" -prtg"

However, I didn't like this solution and i want a direct and clean one.

Hope that somebody can help me with this.

Thanks

#powershell custom-sensors powershell pwsh-exe

Created on Apr 25, 2021 9:15:46 PM



1 Reply

Votes:

0

Hello,

Thank you for your message.

Regarding PowerShell, I'm afraid that it's not possible to use the version 7 directly. I have pushed that feature internally however I can't provide you an ETA.

Executing PowerShell script with version 7 via an intermediary script stays the main solution for now.

Regards.

Created on Apr 27, 2021 9:14:56 AM by  Florian Lesage [Paessler Support]




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.