summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/resource/dsc_script.rb2
-rw-r--r--lib/chef/util/powershell/ps_credential.rb4
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/resource/dsc_script.rb b/lib/chef/resource/dsc_script.rb
index 2877f61eb4..c3602fa60e 100644
--- a/lib/chef/resource/dsc_script.rb
+++ b/lib/chef/resource/dsc_script.rb
@@ -17,10 +17,12 @@
#
require 'chef/exceptions'
+require 'chef/dsl/powershell'
class Chef
class Resource
class DscScript < Chef::Resource
+ include Chef::DSL::Powershell
provides :dsc_script, os: "windows"
diff --git a/lib/chef/util/powershell/ps_credential.rb b/lib/chef/util/powershell/ps_credential.rb
index 01f8c27b6c..3f4558a77c 100644
--- a/lib/chef/util/powershell/ps_credential.rb
+++ b/lib/chef/util/powershell/ps_credential.rb
@@ -29,6 +29,10 @@ class Chef::Util::Powershell
"New-Object System.Management.Automation.PSCredential('#{@username}',('#{encrypt(@password)}' | ConvertTo-SecureString))"
end
+ def to_s
+ to_psobject
+ end
+
private
def encrypt(str)