-
-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Use Case
This gem allows the use of a long-lived manager to which Ruby can send PowerShell invocations and receive the exection output. This reduces the overhead time to execute PowerShell commands from seconds to milliseconds because each execution does not need to spin up a PowerShell process, execute a single pipeline, and tear the process down.
The manager operates by instantiating a custom PowerShell host process to which Ruby can then send commands over an IO pipe— on Windows machines, named pipes, on Unix/Linux, Unix Domain Sockets.
https://github.com/puppetlabs/ruby-pwsh
Describe the Solution You Would Like
Convert the "Facter::Util::Resolution.exec("#{powershell}" commands to make use of pwshlib instead for increased performance and the ability to use Powershell Core over Windows Powershell
Describe Alternatives You've Considered
Add the following parameters to the "Facter::Util::Resolution.exec("#{powershell}" command for faster load times and making sure that no powershell profile is loaded when executing commands
-NoProfile
-NonInteractive
-NoLogo
-ExecutionPolicy 'Bypass'
Additional Context
Add any other context or screenshots about the feature request here.