我正在尝试使用 Puppet 3.0 和以下配方设置 powershell 2.0 的执行策略。
exec { 'rolesfeatures1':
command => 'C:\Windows\System32\cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe Invoke-Command {Set-ExecutionPolicy RemoteSigned}',
provider => windows,
logoutput => true,
}
或者
exec { 'rolesfeatures1':
command => 'C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe Invoke-Command {Set-ExecutionPolicy RemoteSigned}',
provider => windows,
logoutput => true,
}