DSC Resource Kit Release January 2017

Katie Keim [MSFT]

We just released the DSC Resource Kit!

This release includes updates to 8 DSC resource modules, including 11 new DSC resources. In these past 6 weeks, 71 pull requests have been merged and 37 issues have been closed, all thanks to our amazing community!

The modules updated in this release are:

  • AuditPolicyDsc
  • xDismFeature
  • xExchange
  • xHyper-V
  • xNetworking
  • xPSDesiredStateConfiguration
  • xSQLServer
  • xWebAdministration

For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below.

[UPDATE 01/26/17 2:40PM PST] – xHyper-V has now been released with a new resource.

[UPDATE 02/03/17 2:20PM PST] – PSDscResources has now also been released with the new Environment resource and a few bug fixes (release notes). xPSDesiredStateConfiguration was also released again with some of the same updates (release notes).

A new version of xActiveDirectory was also released about two weeks ago with some bug fixes for xADDomain and xADDomainController.

Our last community call for the DSC Resource Kit was last week on January 18. A recording of our updates as well as summarizing notes are available. Join us next time at 9AM PST on March 1 to ask questions and give feedback about your experience with the DSC Resource Kit. Keep an eye on the community agenda for the link to the call agenda.

We strongly encourage you to update to the newest version of all modules using the PowerShell Gallery, and don’t forget to give us your feedback in the comments below, on GitHub, or on Twitter (@PowerShell_Team)!

All resources with the ‘x’ prefix in their names are still experimental – this means that those resources are provided AS IS and are not supported through any Microsoft support program or service. If you find a problem with a resource, please file an issue on GitHub.

Included in this Release

You can see a detailed summary of all changes included in this release in the table below. For past release notes, go to the README.md or Changelog.md file on the GitHub repository page for a specific module (see the How to Find DSC Resource Modules on GitHub section below for details on finding the GitHub page for a specific module).

Module Name Version Release Notes
AuditPolicyDsc 1.1.0.0
  • Added the AuditPolicyCsv resource.
xDismFeature 1.2.0.0
  • xDismFeature: Resource no longer includes the Source parameter when it is not specified
  • Converted appveyor.yml to install Pester from PSGallery instead of from Chocolatey.
xExchange 1.13.0.0
  • Fix function RemoveVersionSpecificParameters
  • xExchMailboxServer: Added missing parameters except these, which are marked as “This parameter is reserved for internal Microsoft use.”
xHyper-V 3.7.0.0
  • Adding a new resource
    • MSFT_xVMNetworkAdapter: Attaches a new VM network adapter to the management OS or VM.
xNetworking 3.2.0.0
    • Fixed typo in the example”s Action property from “Blocked” (which isn”t a valid

value) to “Block”

  • Added support for auto generating wiki, help files, markdown linting

and checking examples.

  • Added NetworkingDsc.ResourceHelper module based on copy from PSDscResources.
  • MSFT_xFirewall:
    • Cleaned up ParameterList table layout and moved into a new file

(MSFT_xFirewall.data.psd1).

  • Separated Localization strings into strings file.
  • Added standard help blocks to all functions to meet HQRM standards.
  • Added CmdletBinding attribute to all functions to meet HQRM standards.
  • Style changes to meet HQRM standards.
  • Fixed issue using CIDR notation for LocalAddress or RemoteAddress.

See GitHub issue.

  • Fixed integration tests so that values being set are correctly tested.
  • Added integration tests for Removal of Firewall rule.
  • Added NetworkingDsc.Common module to contain shared networking functions.
  • MSFT_xDNSServerAddress:
  • Separated Localization strings into strings file.
  • MSFT_xDefaultGatewayAddress:
  • Separated Localization strings into strings file.
  • Style changes to meet HQRM standards.
  • MSFT_xDhcpClient:
  • Separated Localization strings into strings file.
  • Fix parameter descriptions in MOF file.
  • Style changes to meet HQRM standards.
  • MSFT_xDnsClientGlobalSetting:
  • Renamed Localization strings file to be standard naming format.
  • Moved ParameterList into a new file (MSFT_xDnsClientGlobalSetting.data.psd1).
  • Style changes to meet HQRM standards.
  • Removed New-TerminatingError function because never called.
  • Converted to remove Invoke-Expression.
  • MSFT_xDnsConnectionSuffix:
  • Separated Localization strings into strings file.
  • Style changes to meet HQRM standards.
  • MSFT_xHostsFile:
  • Renamed Localization strings file to be standard naming format.
  • Style changes to meet HQRM standards.
  • Refactored for performance
    • Code now reads 38k lines in > 1 second vs 4
  • Now ignores inline comments
  • Added more integration tests
  • MSFT_xIPAddress:
  • Separated Localization strings into strings file.
  • Style changes to meet HQRM standards.
  • MSFT_xNetAdapterBinding:
  • Separated Localization strings into strings file.
  • Style changes to meet HQRM standards.
  • MSFT_xNetAdapterRDMA:
  • Renamed Localization strings file to be standard naming format.
  • Style changes to meet HQRM standards.
  • MSFT_xNetBIOS:
  • Renamed Localization strings file to be standard naming format.
  • Style changes to meet HQRM standards.
  • MSFT_xNetConnectionProfile:
  • Separated Localization strings into strings file.
  • Style changes to meet HQRM standards.
  • MSFT_xNetworkTeam:
  • Style changes to meet HQRM standards.
  • MSFT_xNetworkTeamInterface:
  • Updated integration tests to remove Invoke-Expression.
  • Style changes to meet HQRM standards.
  • MSFT_xRoute:
  • Separated Localization strings into strings file.
  • Style changes to meet HQRM standards.
  • MSFT_xFirewall:
  • Converted to remove Invoke-Expression.
xPSDesiredStateConfiguration 5.2.0.0
  • xWindowsProcess
    • Minor updates to integration tests because one of the tests was flaky.
  • xRegistry:
    • Added support for forward slashes in registry key names. This resolves issue 285.
xSqlServer 5.0.0.0
  • Improvements how tests are initiated in AppVeyor
    • Removed previous workaround (issue 201) from unit tests.
    • Changes in appveyor.yml so that SQL modules are removed before common test is run.
    • Now the deploy step are no longer failing when merging code into Dev. Neither is the deploy step failing if a contributor had AppVeyor connected to the fork of xSQLServer and pushing code to the fork.
  • Changes to README.md
    • Changed the contributing section to help new contributors.
    • Added links for each resource so it is easier to navigate to the parameter list for each resource.
    • Moved the list of resources in alphabetical order.
    • Moved each resource parameter list into alphabetical order.
    • Removed old text mentioning System Center.
    • Now the correct product name is written in the installation section, and a typo was also fixed.
    • Fixed a typo in the Requirements section.
    • Added link to Examples folder in the Examples section.
    • Change the layout of the README.md to closer match the one of PSDscResources
    • Added more detailed text explaining what operating systemes WMF5.0 can be installed on.
    • Verified all resource schema files with the README.md and fixed some errors (descriptions was not verified).
    • Added security requirements section for resource xSQLServerEndpoint and xSQLAOGroupEnsure.
  • Changes to xSQLServerSetup
    • The resource no longer uses Win32_Product WMI class when evaluating if SQL Server Management Studio is installed. See article kb974524 for more information.
    • Now it uses CIM cmdlets to get information from WMI classes.
    • Resolved all of the PSScriptAnalyzer warnings that was triggered in the common tests.
    • Improvement for service accounts to enable support for Managed Service Accounts as well as other nt authority accounts
    • Changes to the helper function Copy-ItemWithRoboCopy
      • Robocopy is now started using Start-Process and the error handling has been improved.
      • Robocopy now removes files at the destination path if they no longer exists at the source.
      • Robocopy copies using unbuffered I/O when available (recommended for large files).
    • Added a more descriptive text for the parameter SourceCredential to further explain how the parameter work.
    • BREAKING CHANGE: Removed parameter SourceFolder.
    • BREAKING CHANGE: Removed default value “$PSScriptRoot….” from parameter SourcePath.
    • Old code, that no longer filled any function, has been replaced.
      • Function ResolvePath has been replaced with [Environment]::ExpandEnvironmentVariables($SourcePath) so that environment variables still can be used in Source Path.
      • Function NetUse has been replaced with New-SmbMapping and Remove-SmbMapping.
    • Renamed function GetSQLVersion to Get-SqlMajorVersion.
    • BREAKING CHANGE: Renamed parameter PID to ProductKey to avoid collision with automatic variable $PID
  • Changes to xSQLServerScript
    • All credential parameters now also has the type [System.Management.Automation.Credential()] to better work with PowerShell 4.0.
    • It is now possible to configure two instances on the same node, with the same script.
    • Added to the description text for the parameter Credential describing how to authenticate using Windows Authentication.
    • Added examples to show how to authenticate using either SQL or Windows authentication.
    • A recent issue showed that there is a known problem running this resource using PowerShell 4.0. For more information, see issue #273
  • Changes to xSQLServerFirewall
    • BREAKING CHANGE: Removed parameter SourceFolder.
    • BREAKING CHANGE: Removed default value “$PSScriptRoot….” from parameter SourcePath.
    • Old code, that no longer filled any function, has been replaced.
      • Function ResolvePath has been replaced with [Environment]::ExpandEnvironmentVariables($SourcePath) so that environment variables still can be used in Source Path.
    • Adding new optional parameter SourceCredential that can be used to authenticate against SourcePath.
    • Solved PSSA rules errors in the code.
    • Get-TargetResource no longer return $true when no products was installed.
  • Changes to the unit test for resource
    • xSQLServerSetup
      • Added test coverage for helper function Copy-ItemWithRoboCopy
  • Changes to xSQLServerLogin
    • Removed ShouldProcess statements
    • Added the ability to enforce password policies on SQL logins
  • Added common test (xSQLServerCommon.Tests) for xSQLServer module
    • Now all markdown files will be style checked when tests are running in AppVeyor after sending in a pull request.
    • Now all Examples will be tested by compiling to a .mof file after sending in a pull request.
  • Changes to xSQLServerDatabaseOwner
    • The example “SetDatabaseOwner” can now compile, it wrongly had a DependsOn in the example.
  • Changes to SQLServerRole
    • The examples “AddServerRole” and “RemoveServerRole” can now compile, it wrongly had a DependsOn in the example.
  • Changes to CONTRIBUTING.md
    • Added section “Tests for examples files”
    • Added section “Tests for style check of Markdown files”
    • Added section “Documentation with Markdown”
    • Added texts to section “Tests”
  • Changes to xSQLServerHelper
    • added functions
      • Get-SqlDatabaseRecoveryModel
      • Set-SqlDatabaseRecoveryModel
  • Examples
    • xSQLServerDatabaseRecoveryModel
      • 1-SetDatabaseRecoveryModel.ps1
    • xSQLServerDatabasePermission
      • 1-GrantDatabasePermissions.ps1
      • 2-RevokeDatabasePermissions.ps1
      • 3-DenyDatabasePermissions.ps1
    • xSQLServerFirewall
      • 1-CreateInboundFirewallRules
      • 2-RemoveInboundFirewallRules
  • Added tests for resources
    • xSQLServerDatabaseRecoveryModel
    • xSQLServerDatabasePermissions
    • xSQLServerFirewall
  • Changes to xSQLServerDatabaseRecoveryModel
    • BREAKING CHANGE: Renamed xSQLDatabaseRecoveryModel to xSQLServerDatabaseRecoveryModel to align with naming convention.
    • BREAKING CHANGE: The mandatory parameters now include SQLServer, and SQLInstanceName.
  • Changes to xSQLServerDatabasePermission
    • BREAKING CHANGE: Renamed xSQLServerDatabasePermissions to xSQLServerDatabasePermission to align wíth naming convention.
    • BREAKING CHANGE: The mandatory parameters now include PermissionState, SQLServer, and SQLInstanceName.
  • Added support for clustered installations to xSQLServerSetup
    • Migrated relevant code from xSQLServerFailoverClusterSetup
    • Removed Get-WmiObject usage
    • Clustered storage mapping now supports asymmetric cluster storage
    • Added support for multi-subnet clusters
    • Added localized error messages for cluster object mapping
    • Updated README.md to reflect new parameters
  • Updated description for xSQLServerFailoverClusterSetup to indicate it is deprecated.
  • xPDT helper module
    • Function GetxPDTVariable was removed since it no longer was used by any resources.
    • File xPDT.xml was removed since it was not used by any resources, and did not provide any value to the module.
  • Changes xSQLServerHelper moduled
    • Removed the globally defined $VerbosePreference = Continue from xSQLServerHelper.
    • Fixed a typo in a variable name in the function New-ListenerADObject.
    • Now Restart-SqlService will correctly show the services it restarts. Also fixed PSSA warnings.
xWebAdministration 1.17.0.0
  • Added removal of self signed certificate to the integration tests of xWebsite, fixes 276.
  • Added EnabledProtocols to xWebApplication.
  • Changed SSLFlags for xWebApplication to comma seperate multiple SSL flags, fixes 232.

How to Find Released DSC Resource Modules

To see a list of all released DSC Resource Kit modules, go to the PowerShell Gallery and display all modules tagged as DSCResourceKit. You can also enter a module’s name in the search box in the upper right corner of the PowerShell Gallery to find a specific module.

Of course, you can also always use PowerShellGet (available in WMF 5.0) to find modules with DSC Resources:

# To list all modules that are part of the DSC Resource Kit
Find-Module -Tag DSCResourceKit 
# To list all DSC resources from all sources 
Find-DscResource

 

To find a specific module, go directly to its URL on the PowerShell Gallery: http://www.powershellgallery.com/packages/< module name > For example: http://www.powershellgallery.com/packages/xWebAdministration

We recommend that you use PowerShellGet to install DSC resource modules:

Install-Module -Name < module name >

 

For example:

Install-Module -Name xWebAdministration

 

To update all previously installed modules at once, open an elevated PowerShell prompt and use this command:

Update-Module

 

After installing modules, you can discover all DSC resources available to your local system with this command:

Get-DscResource

 

How to Find DSC Resource Modules on GitHub

All resource modules in the DSC Resource Kit are available open-source on GitHub. You can see the most recent state of a resource module by visiting its GitHub page at: https://github.com/PowerShell/< module name > For example, for the xCertificate module, go to: https://github.com/PowerShell/xCertificate.

All DSC modules are also listed as submodules of the DscResources repository in the xDscResources folder.

How to Contribute

You are more than welcome to contribute to the development of the DSC Resource Kit! There are several different ways you can help. You can create new DSC resources or modules, add test automation, improve documentation, fix existing issues, or open new ones. See our contributing guide for more info on how to become a DSC Resource Kit contributor.

If you would like to help, please take a look at the list of open issues for the DscResources repository. You can also check issues for specific resource modules by going to: https://github.com/PowerShell/< module name >/issues For example: https://github.com/PowerShell/xPSDesiredStateConfiguration/issues

Your help in developing the DSC Resource Kit is invaluable to us!

Questions, comments?

If you’re looking into using PowerShell DSC, have questions or issues with a current resource, or would like a new resource, let us know in the comments below, on Twitter (@PowerShell_Team), or by creating an issue on GitHub.

Katie Keim Software Engineer PowerShell Team @katiedsc (Twitter) @kwirkykat (GitHub)

0 comments

Discussion is closed.

Feedback usabilla icon