我想用下面的配方爲使用Puppet 3.0的powershell 2.0設置執行策略。通過Puppet 3.0設置Powershell執行策略
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,
}
我認爲它實際上不是爲我工作 EXEC { 'rolesfeatures1': \t \t命令=>「C:\ WINDOWS \ SYSTEM32 \ WindowsPowerShell \ V1.0 \ Powershell.exe -Command「& {SET-ExecutionPolicy RemoteSigned就是-Force}」」, \t \t提供商=>窗, \t \t logoutput =>真實, \t} – Maverick