n3snah / powershell7

Puppet Module for Powershell 7
Apache License 2.0
0 stars 1 forks source link

add powershell 7 provider for things like exec #11

Closed n3snah closed 3 years ago

n3snah commented 3 years ago

Currently if you use the Powershell provider it will use the powershell 5.x provider. we need to have the powershell 7 provider capability

n3snah commented 3 years ago

There is capability for this using the https://forge.puppet.com/modules/puppetlabs/powershell module on the forge. At this time v5.0.0 will not be able to use powershell7 as a provider unless you specify the exec path.

exec { 'pwsh7cmd:
  command  => '$PSVersionTable | Out-File -Path C:/test.txt',
  provider => pwsh,
  path     => 'C:/Program Files/PowerShell/7'
}

There is no plan to create a new provider however as its out of scope for what this module is intended for.