DSC Resource Kit November 2016 Release

We just released the DSC Resource Kit!

Since our last release on September 21, we have added 1 new repository, PSDscResources, which will serve as the new home of the in-box DSC resources from the PSDesiredStateConfiguration module. This new module now has over 75,000 downloads from the PowerShell Gallery! Wow! Read more about PSDscResources in our blog post here.

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

The modules updated in this release are:

  • xActiveDirectory
  • xCertificate
  • xExchange
  • xNetworking
  • xPSDesiredStateConfiguration
  • xRemoteDesktopSessionHost
  • xSqlServer
  • xStorage
  • xWebAdministration
  • SharePointDsc
  • SystemLocaleDsc
  • PSDscResources

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

Our last community call for the DSC Resource Kit was last week on October 26. Unfortunately, we had technical difficulties with Skype and weren’t able to actually see or hear any of our wonderful community members. We still posted a recording of our updates as well as summarizing notes. Join us next time to ask questions and give feedback about your experience with the DSC Resource Kit. Keep an eye on the community agenda for the next call date.

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)!

As with past Resource Kits, 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
xActiveDirectory 2.14.0.0
  • xADDomainController: Adds Site option.
xCertificate 2.2.0.0
  • Converted appveyor.yml to install Pester from PSGallery instead of from Chocolatey.
  • Moved unit tests to correct folder structure.
  • Changed unit tests to use standard test templates.
  • Updated all resources to meet HQRM standards and style guidelines.
  • Added .gitignore file
  • Added .gitattributes file to force line endings to CRLF to allow unit tests to work.
  • xCertificateCommon:
    • Moved common code into new module CertificateCommon.psm1
    • Added standard exception code.
                      • to use acceptable verb Test-*.
    • Added help to all functions.
  • xCertificateImport:
    • Fixed bug with Test-TargetResource incorrectly detecting change required.
    • Reworked unit tests for improved code coverage to meet HQRM standards.
    • Created Integration tests for both importing and removing an imported certificate.
    • Added descriptions to MOF file.
    • Removed default parameter values for parameters that are required or keys.
    • Added verbose messages.
    • Split message and error strings into localization string files.
    • Added help to all functions.
  • xPfxImport:
    • Fixed bug with Test-TargetResource incorrectly detecting change required.
    • Reworked unit tests for improved code coverage to meet HQRM standards.
    • Created Integration tests for both importing and removing an imported certificate.
    • Added descriptions to MOF file.
    • Removed default parameter values for parameters that are required or keys.
    • Added verbose messages.
    • Split message and error strings into localization string files.
    • Added help to all functions.
  • xCertReq:
    • Cleaned up descriptions in MOF file.
    • Fixed bugs generating certificate when credentials are specified.
    • Allowed output of certificate request when credentials are specified.
    • Split message and error strings into localization string files.
    • Created unit tests and integration tests.
    • Improved logging output to enable easier debugging.
    • Added help to all functions.
  • xPDT:
    • Renamed to match standard module name format (MSFT_x).
    • Modified to meet 100 characters or less line length where possible.
    • Split message and error strings into localization string files.
    • Removed unused functions.
    • Renamed functions to standard verb-noun form.
    • Added help to all functions.
    • Fixed bug in Wait-Win32ProcessEnd that prevented waiting for process to end.
    • Added Wait-Win32ProcessStop to wait for a process to stop.
    • Removed unused and broken scheduled task code.
xExchange 1.11.0.0
  • xExchActiveSyncVirtualDirectory: Fix issue where ClientCertAuth parameter set to “Allowed” instead of “Accepted”
xNetworking 3.0.0.0
  • Corrected integration test filenames:
    • MSFT_xDefaultGatewayAddress.Integration.Tests.ps1
    • MSFT_xDhcpClient.Integration.Tests.ps1
    • MSFT_xDNSConnectionSuffix.Integration.Tests.ps1
    • MSFT_xNetAdapterBinding.Integration.Tests.ps1
  • Updated all integration tests to use v1.1.0 header and script variable context.
  • Updated all unit tests to use v1.1.0 header and script variable context.
  • Removed uneccessary global variable from MSFT_xNetworkTeam.integration.tests.ps1
  • Converted Invoke-Expression in all integration tests to &.
  • Fixed unit test description in xNetworkAdapter.Tests.ps1
  • xNetAdapterBinding
    • Added support for the use of wildcard (*) in InterfaceAlias parameter.
  • BREAKING CHANGE – MSFT_xIPAddress: SubnetMask parameter renamed to PrefixLength.
xPSDesiredStateConfiguration 5.0.0.0
  • xWindowsFeature:
    • Cleaned up resource (PSSA issues, formatting, etc.)
    • Added/Updated Tests and Examples
    • BREAKING CHANGE: Removed the unused Source parameter
    • Updated to a high quality resource
  • xDSCWebService:
    • Add DatabasePath property to specify a custom database path and enable multiple pull server instances on one server.
    • Rename UseUpToDateSecuritySettings property to UseSecurityBestPractices.
    • Add DisableSecurityBestPractices property to specify items that are excepted from following best practice security settings.
  • xGroup:
    • Fixed PSSA issues
    • Formatting updated as per style guidelines
    • Missing comment-based help added for Get-/Set-/Test-TargetResource
    • Typos fixed in Unit test script
    • Unit test “Get-TargetResource/Should return hashtable with correct values when group has no members” updated to handle the expected empty Members array correctly
    • Added a lot of unit tests
    • Cleaned resource
  • xUser:
    • Fixed PSSA/Style violations
    • Added/Updated Tests and Examples
  • Added xWindowsPackageCab
  • xService:
    • Fixed PSSA/Style violations
    • Updated Tests
    • Added “Ignore” state
xRemoteDesktopSessionHost 1.3.0.0
  • Converted appveyor.yml to install Pester from PSGallery instead of from Chocolatey.
xSQLServer 3.0.0.0
  • xSQLServerHelper
    • added functions
      • Test-SQLDscParameterState
      • Get-SqlDatabaseOwner
      • Set-SqlDatabaseOwner
    • Examples
      • xSQLServerDatabaseOwner
        • 1-SetDatabaseOwner.ps1
      • Added tests for resources
        • MSFT_xSQLServerDatabaseOwner.Tests.Tests.ps1
xStorage 2.8.0.0
  • added test for existing file system and no drive letter assignment to allow simple drive letter assignment in MSFT_xDisk.psm1
  • added unit test for volume with existing partition and no drive letter assigned for MSFT_xDisk.psm1
  • xMountImage: Fixed mounting disk images on Windows 10 Anniversary Edition
  • Updated to meet HQRM guidelines.
  • Moved all strings into localization files.
  • Fixed examples to import xStorage module.
  • Fixed Readme.md layout issues.
  • xWaitForDisk:
    • Added support for setting DriveLetter parameter with or without colon.
    • MOF Class version updated to 1.0.0.0.
  • xWaitForVolume:
    • Added new resource.
  • StorageCommon:
    • Added helper function module.
    • Corrected name of unit tests file.
  • xDisk:
    • Added validation of DriveLetter parameter.
    • Added support for setting DriveLetter parameter with or without colon.
    • Removed obfuscation of drive/partition errors by eliminating try/catch block.
    • Improved code commenting.
    • Reordered tests so they are in same order as module functions to ease creation.
    • Added FSFormat parameter to allow disk format to be specified.
    • Size or AllocationUnitSize mismatches no longer trigger Set-TargetResource because these values can”t be changed (yet).
    • MOF Class version updated to 1.0.0.0.
    • Unit tests changed to match xDiskAccessPath methods.
    • Added additional unit tests to Get-TargetResource.
    • Fixed bug in Get-TargetResource when disk did not contain any partitions.
    • Added missing cmdletbinding() to functions.
  • xMountImage (Breaking Change):
    • Removed Name parameter (Breaking Change)
    • Added validation of DriveLetter parameter.
    • Added support for setting DriveLetter parameter with or without colon.
    • MOF Class version updated to 1.0.0.0.
    • Enabled mounting of VHD/VHDx/VHDSet disk images.
    • Added StorageType and Access parameters to allow mounting VHD and VHDx disks as read/write.
  • xDiskAccessPath:
    • Added new resource.
    • Added support for changing/setting volume label.
xWebAdministration 1.15.0.0
  • Corrected name of AuthenticationInfo parameter in Readme.md.
  • Added sample for xWebApplication for adding new web application.
  • Corrected description for AuthenticationInfo for xWebApplication and xWebsite.
SharePointDsc 1.4.0.0
  • Set-TargetResource of Service Application now also removes all associated proxies
  • Fixed issue with all SPServiceApplication for OS not in En-Us language, add GetType().FullName method in:
    • SPAccessServiceApp
    • SPAppManagementServiceApp
    • SPBCSServiceApp
    • SPExcelServiceApp
    • SPManagedMetaDataServiceApp
    • SPPerformancePointServiceApp
    • SPSearchServiceApp
    • SPSearchCrawlRule
    • SPSecureStoreServiceApp
    • SPSubscriptionSettingsServiceApp
    • SPUsageApplication
    • SPUserProfileServiceApp
    • SPVisioServiceApp
    • SPWordAutomationServiceApp
    • SPWorkManagementServiceApp
  • Fixed issue with SPServiceInstance for OS not in En-Us language, add GetType().Name method in:
    • SPDistributedCacheService
    • SPUserProfileSyncService
  • Fixed issue with SPInstallLanguagePack to install before farm creation
  • Fixed issue with mounting SPContentDatabase
  • Fixed issue with SPShellAdmin and Content Database method
  • Fixed issue with SPServiceInstance (Set-TargetResource) for OS not in En-Us language
  • Added .Net 4.6 support check to SPInstall and SPInstallPrereqs
  • Improved code styling
  • SPVisioServiceapplication now creates proxy and lets you specify a name for it
  • New resources: SPAppStoreSettings
  • Fixed bug with SPInstallPrereqs to allow minor version changes to prereqs for SP2016
  • Refactored unit tests to consolidate and streamline test approaches
  • Updated SPExcelServiceApp resource to add support for trusted file locations and most other properties of the service app
  • Added support to SPMetadataServiceApp to allow changing content type hub URL on existing service apps
  • Fixed a bug that would cause SPSearchResultSource to throw exceptions when the enterprise search centre URL has not been set
  • Updated documentation of SPProductUpdate to reflect the required install order of product updates
SystemLocaleDsc 1.1.0.0
  • Fix AppVeyor.yml build process.
  • Convert Get-TargetResource to output IsSingleInstance value passed in as parameter.
PSDscResources 2.0.0.0, 2.1.0.0 2.0.0.0

  • Initial release

2.1.0.0

  • Added WindowsFeature

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

How to Install DSC Resource Modules From the PowerShell Gallery

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)