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
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
Please sign in to leave a comment.