1

Microsoft recently changed their download repository for Windows Powershell to require TLS 1.2+ which Windows Powershell 5.1 doesn't support without the runtime setting change to Net.ServicePointManager.

Can I change Puppet to use Pwsh (7.x) as the default or is there some Puppet code I can change to inject the Net.ServicePointManager snippet into to configured 5.1 to support TLS 1.2 in all Puppet initiated Windows Powershell sessions?

The underlying issue I'm trying to solve is package failing with an error similar to this.

2 Answers 2

0

The puppetlabs-powershell module has a short example in the readme on how to use PowerShell6/7 instead of 5.1 by using the pwsh provider instead of the powershell provider: https://github.com/puppetlabs/puppetlabs-powershell#requirements

To use the pwsh provider, change the provider line to pwsh and set the path if your pwsh install is not on PATH.

exec { 'RESOURCENAME':
  ...
  path     => '/usr/alice/pscore',
  provider => pwsh,
}
2
  • Sorry, this is in regards to how the package module calls out to Powershell. Not the actual PowerShell module. I'm not sure I am really asking the question correctly. Jul 10, 2020 at 15:32
  • If we forked the cholocatey provider, could we change this line to pwsh? Jul 10, 2020 at 15:38
0

The issue was in an old windowspowershell provider. The fix is documented here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .