puppetlabs / facter

Collect and display system facts
https://puppet.com/open-source/#osp
Apache License 2.0
621 stars 498 forks source link

custom facter facts is calling old powershell.exe #2777

Open rismoney opened 3 weeks ago

rismoney commented 3 weeks ago

My understanding is facter is not using the https://github.com/puppetlabs/ruby-pwsh gem. It is not possible to control facters external fact execution using powershell vs pwsh. So what I am requesting, is the ability to possible control this, perhaps through facter.conf configuration. Also the benefits of using this gem, is that you drastically improve performance by avoiding instantiation of powershell processes.

cthorn42 commented 6 days ago

@rismoney thank you for the enhancement, could you break things down a bit more on what you mean by the differences of execution between powershell and ruby-pwsh?

rismoney commented 6 days ago

if you launch powershell via a fact, you can't control usage of pwsh or powershell (versions)

Also the gem usage prevents multiple instances of powershell, and you take advantage of runspaces automatically,