Puppet Class: winrm::config::execution_policy
- Defined in:
-
manifests/config/execution_policy.pp
Summary
Configures the execution policy allowed on the system
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7
Overview
14
15
16
17
18
19
20
21
22
|
# File 'manifests/config/execution_policy.pp', line 14
class winrm::config::execution_policy (
String $execution_policy = $winrm::execution_policy,
) {
exec { 'Set-Execution-Policy':
command => "Set-ExecutionPolicy -ExecutionPolicy ${execution_policy} -Scope LocalMachine -Force",
unless => "If ((Get-ExecutionPolicy -Scope LocalMachine) -ne '${execution_policy}') { exit 1 }",
provider => powershell,
}
}
|