diff options
author | Davin Taddeo <davin@chef.io> | 2020-12-16 09:47:49 -0500 |
---|---|---|
committer | Davin Taddeo <davin@chef.io> | 2020-12-16 09:47:49 -0500 |
commit | 778ef633c566dfa0095fc6ce6b05682d49dc56d6 (patch) | |
tree | 24c2b761845317e09ba687d15544782b216b4370 /lib | |
parent | 9c5ae43f3dcb9b80115cce019f3bc403536fab5f (diff) | |
download | chef-778ef633c566dfa0095fc6ce6b05682d49dc56d6.tar.gz |
Updates to use powershell_exec and shell_out instead of powershell_out.
Signed-off-by: Davin Taddeo <davin@chef.io>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/resource/windows_security_policy.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/chef/resource/windows_security_policy.rb b/lib/chef/resource/windows_security_policy.rb index bf1999bc47..521dc94718 100644 --- a/lib/chef/resource/windows_security_policy.rb +++ b/lib/chef/resource/windows_security_policy.rb @@ -128,7 +128,7 @@ class Chef file_path = file.path.gsub("/", '\\') cmd = "C:\\Windows\\System32\\secedit /configure /db C:\\windows\\security\\new.sdb /cfg #{file_path} /areas SECURITYPOLICY" end - powershell_out!(cmd) + shell_out!(cmd) file.unlink end end @@ -160,10 +160,9 @@ class Chef MinimumPasswordAge = $security_options_hash.MinimumPasswordAge NewGuestName = $security_options_hash.NewGuestName LockoutBadCount = $security_options_hash.LockoutBadCount - }) | ConvertTo-Json + }) CODE - output = powershell_out(powershell_code) - Chef::JSONCompat.from_json(output.stdout) + powershell_exec(powershell_code).result end end end |