Powershell version
Is it possible to specify what version of Powershell the scanners use? iow, Can I specify that client systems run the scanner using Powershell Core (7.x) as opposed to the built-in powershell 5.x?
0
Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.
Is it possible to specify what version of Powershell the scanners use? iow, Can I specify that client systems run the scanner using Powershell Core (7.x) as opposed to the built-in powershell 5.x?
Comments
Not directly. PDQ Deploy and Inventory are built with .NET Framework, which can't tie into .NET Core things like PowerShell Core. PDQ would have to do a lot of work to add a native PS Core option.
However, you can create a PowerShell Scanner that runs pwsh.exe. It's a bit of a kludge, but it seems to work. It would probably break if your script returns something that exists in PS Core, but not Windows PowerShell though. I created a proof of concept:
Here's the contents of my Script field:
Here's the contents of "PS Core Test.ps1":
I did some more experimentation and found a potentially cleaner way to do it.
Execute PS Core.ps1
PS Core Test 3.ps1