summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RELEASE_NOTES.md40
1 files changed, 40 insertions, 0 deletions
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index c32309064a..cba5b9f415 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,6 +1,46 @@
# Chef Client Release Notes 12.5.0:
* OSX 10.11 support (support for SIP and service changes)
+## PSCredential support for the `dsc_script` resource
+
+The `dsc_script` resource now supports the use of the `ps_credential`
+helper method. This method generates a Ruby object which can be described
+as a Powershell PSCredential object. For example, if you wanted to created
+a user using DSC, previously you would have had to do something like:
+
+```ruby
+dsc_script 'create-foo-user' do
+ code <<-EOH
+ $username = "placeholder"
+ $password = "#{FooBarBaz1!}" | ConvertTo-SecureString -asPlainText -Force
+ $cred = New-Object System.Management.Automation.PSCredential($username, $password)
+ User FooUser00
+ {
+ Ensure = "Present"
+ UserName = 'FooUser00'
+ Password = $cred
+ }
+ EOH
+ configuration_data_script "path/to/config/data.psd1"
+end
+```
+
+This can now be replaced with
+
+```ruby
+dsc_script 'create-foo-user' do
+ code <<-EOH
+ User FooUser00
+ {
+ Ensure = "Present"
+ UserName = 'FooUser00'
+ Password = #{ps_credential("FooBarBaz1!")}
+ }
+ EOH
+ configuration_data_script "path/to/config/data.psd1"
+end
+```
+
## New `knife rehash` for faster command loading
The new `knife rehash` command speeds up day-to-day knife usage by