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
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.
Apr, 2021 - Permalink