diff options
Diffstat (limited to 'lib/chef/resource/powershell_script.rb')
-rw-r--r-- | lib/chef/resource/powershell_script.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/chef/resource/powershell_script.rb b/lib/chef/resource/powershell_script.rb index 7699c0a976..5c9b540f55 100644 --- a/lib/chef/resource/powershell_script.rb +++ b/lib/chef/resource/powershell_script.rb @@ -22,11 +22,18 @@ class Chef class PowershellScript < Chef::Resource::WindowsScript unified_mode true + set_guard_inherited_attributes(:interpreter) + provides :powershell_script, os: "windows" property :flags, String, description: "A string that is passed to the Windows PowerShell command" + property :interpreter, String, + default: "powershell", + equal_to: %w{powershell pwsh}, + description: "The interpreter type, `powershell` or `pwsh` (PowerShell Core)" + property :convert_boolean_return, [true, false], default: false, description: <<~DESC @@ -62,7 +69,6 @@ class Chef def initialize(*args) super - @interpreter = "powershell.exe" @default_guard_interpreter = resource_name end |