DSC Resource Kit Release April 2019

Katie Kragenbrink [MSFT]

We just released the DSC Resource Kit!

This release includes updates to 13 DSC resource modules. In the past 6 weeks, 87 pull requests have been merged and 90 issues have been closed, all thanks to our amazing community!

The modules updated in this release are:

  • CertificateDsc
  • ComputerManagementDsc
  • NetworkingDsc
  • OfficeOnlineServerDsc
  • SecurityPolicyDsc
  • SharePointDsc
  • SqlServerDsc
  • StorageDsc
  • xActiveDirectory
  • xPSDesiredStateConfiguration
  • xSMBShare
  • xWindowsUpdate
  • xWinEventLog

xWebAdministration is also in the pipeline for release as soon as it passes all tests.

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

Our latest community call for the DSC Resource Kit was last Wednesday, March 27. A recording of the call with be posted on the PowerShell YouTube channel soon. You can join us for the next call at 12PM (Pacific time) on May 8 to ask questions and give feedback about your experience with the DSC Resource Kit.

The next DSC Resource Kit release will be on Wednesday, May 15.

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

Please see our documentation here for information on the support of these resource modules.

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
CertificateDsc 4.5.0.0
  • Fix example publish to PowerShell Gallery by adding gallery_api environment variable to AppVeyor.yml – fixes Issue 187.
  • CertificateDsc.Common.psm1
    • Exclude assemblies that set DefinedTypes to null instead of an empty array to prevent failures on GetTypes(). This issue occurred with the Microsoft.WindowsAzure.Storage.dll assembly.
ComputerManagementDsc 6.3.0.0
  • Correct PSSA custom rule violations – fixes Issue 209.
  • Correct long example filenames for PowerShellExecutionPolicy examples.
  • Opted into Common Tests “Required Script Analyzer Rules”, “Flagged Script Analyzer Rules”, “New Error-Level Script Analyzer Rules” “Custom Script Analyzer Rules” and “Relative Path Length” – fixes Issue 152.
  • PowerPlan:
    • Added support to specify the desired power plan either as name or guid. Fixes Issue 59
    • Changed the resource so it uses Windows APIs instead of WMI/CIM (Workaround for Server 2012R2 Core, Nano Server, Server 2019 and Windows 10). Fixes Issue 155 and Issue 65
NetworkingDsc 7.1.0.0
  • New Resource: NetAdapterState to enable or disable a network adapter – fixes Issue 365
  • Fix example publish to PowerShell Gallery by adding gallery_api environment variable to AppVeyor.yml – fixes Issue 385.
  • MSFT_Proxy:
    • Fixed ProxyServer, ProxyServerExceptions and AutoConfigURL parameters so that they correctly support strings longer than 255 characters – fixes Issue 378.
OfficeOnlineServerDsc 1.3.0.0
  • Changes to OfficeOnlineServerDsc
    • Added pull request template and issue templates.
  • OfficeOnlineServerInstall
    • Added check to test if the setup file is blocked or not;
    • Added ability to install from a UNC path, by adding server to IE Local Intranet Zone. This will prevent an endless wait caused by security warning;
  • OfficeOnlineServerInstallLanguagePack
    • Added check to test if the setup file is blocked or not;
    • Added ability to install from a UNC path, by adding server to IE Local Intranet Zone. This will prevent an endless wait caused by security warning
SecurityPolicyDsc 2.8.0.0
  • Bug fix – Issue 71 – Issue Added Validation Attributes to AccountPolicy & SecurityOption
  • Bug fix – Network_security_Restrict_NTLM security option names now maps to correct keys. This fix could impact your systems.
  • Updated LICENSE file to match the Microsoft Open Source Team standard. Fixes Issue 108
  • Refactored the SID translation process to not throw a terminating error when called from Test-TargetResource
  • Updated verbose message during the SID translation process to identify the policy where an orphaned SID exists
  • Added the EType “FUTURE” to the security option “Network_security_Configure_encryption_types_allowed_for_Kerberos”
  • Documentation update to include all valid settings for security options and account policies
SharePointDsc 3.3.0.0
  • SharePointDsc generic
    • Implemented workaround for PSSA v1.18 issue. No further impact for the rest of the resources
    • Fixed issue where powershell session was never removed and leaded to memory leak
    • Added readme.md file to Examples folder, which directs users to the Wiki on Github
  • SPAppManagementServiceApp
    • Added ability to create Service App Proxy if this is not present
  • SPConfigWizard
    • Improved logging
  • SPFarm
    • Corrected issue where the resource would try to join a farm, even when the farm was not yet created
    • Fixed issue where an error was thrown when no DeveloperDashboard parameter was specfied
  • SPInstall
    • Added check to unblock setup file if it is blocked because it is coming from a network location. This to prevent endless wait
    • Added ability to install from a UNC path, by adding server to IE Local Intranet Zone. This will prevent an endless wait caused by security warning
  • SPInstallLanguagePack
    • Added check to unblock setup file if it is blocked because it is coming from a network location. This to prevent endless wait
    • Corrected issue with Norwegian language pack not being correctly detected
    • Added ability to install from a UNC path, by adding server to IE Local Intranet Zone. This will prevent an endless wait caused by security warning
  • SPProductUpdate
    • Added ability to install from a UNC path, by adding server to IE Local Intranet Zone. This will prevent an endless wait caused by security warning
    • Major refactor of this resource to remove the dependency on the existence of the farm. This allows the installation of product updates before farm creation.
  • SPSearchContentSource
    • Corrected typo that prevented a correct check for ContinuousCrawl
  • SPSearchServiceApp
    • Added possibility to manage AlertsEnabled setting
  • SPSelfServiceSiteCreation
    • Added new SharePoint 2019 properties
  • SPSitePropertyBag
    • Added new resource
  • SPWebAppThrottlingSettings
    • Fixed issue with ChangeLogRetentionDays not being applied
SqlServerDsc 12.4.0.0
  • Changes to SqlServerDsc
    • Added new resources.
      • SqlRSSetup
    • Added helper module DscResource.Common from the repository DscResource.Template.
      • Moved all helper functions from SqlServerDscHelper.psm1 to DscResource.Common.
      • Renamed Test-SqlDscParameterState to Test-DscParameterState.
      • New-TerminatingError error text for a missing localized message now matches the output even if the “missing localized message” localized message is also missing.
    • Added helper module DscResource.LocalizationHelper from the repository DscResource.Template, this replaces the helper module CommonResourceHelper.psm1.
    • Cleaned up unit tests, mostly around loading cmdlet stubs and loading classes stubs, but also some tests that were using some odd variants.
    • Fix all integration tests according to issue PowerShell/DscResource.Template14.
  • Changes to SqlServerMemory
    • Updated Cim Class to Win32_ComputerSystem (instead of Win32_PhysicalMemory) because the correct memory size was not being detected correctly on Azure VMs (issue 914).
  • Changes to SqlSetup
    • Split integration tests into two jobs, one for running integration tests for SQL Server 2016 and another for running integration test for SQL Server 2017 (issue 858).
    • Localized messages for Master Data Services no longer start and end with single quote.
    • When installing features a verbose message is written if a feature is found to already be installed. It no longer quietly removes the feature from the /FEATURES argument.
    • Cleaned up a bit in the tests, removed excessive piping.
    • Fixed minor typo in examples.
    • A new optional parameter FeatureFlag parameter was added to control breaking changes. Functionality added under a feature flag can be toggled on or off, and could be changed later to be the default. This way we can also make more of the new functionalities the default in the same breaking change release (issue 1105).
    • Added a new way of detecting if the shared feature CONN (Client Tools Connectivity, and SQL Client Connectivity SDK), BC (Client Tools Backwards Compatibility), and SDK (Client Tools SDK) is installed or not. The new functionality is used when the parameter FeatureFlag is set to "DetectionSharedFeatures" (issue 1105).
    • Added a new helper function Get-InstalledSharedFeatures to move out some of the code from the Get-TargetResource to make unit testing easier and faster.
    • Changed the logic of “Build the argument string to be passed to setup” to not quote the value if root directory is specified (issue 1254).
    • Moved some resource specific helper functions to the new helper module DscResource.Common so they can be shared with the new resource SqlRSSetup.
    • Improved verbose messages in Test-TargetResource function to more clearly tell if features are already installed or not.
    • Refactored unit tests for the functions Test-TargetResource and Set-TargetResource to improve testing speed.
    • Modified the Test-TargetResource and Set-TargetResource to not be case-sensitive when comparing feature names. This was handled correctly in real-world scenarios, but failed when running the unit tests (and testing casing).
  • Changes to SqlAGDatabase
    • Fix MatchDatabaseOwner to check for CONTROL SERVER, IMPERSONATE LOGIN, or CONTROL LOGIN permission in addition to IMPERSONATE ANY LOGIN.
    • Update and fix MatchDatabaseOwner help text.
  • Changes to SqlAG
    • Updated documentation on the behaviour of defaults as they only apply when creating a group.
  • Changes to SqlAGReplica
    • AvailabilityMode, BackupPriority, and FailoverMode defaults only apply when creating a replica not when making changes to an existing replica. Explicit parameters will still change existing replicas (issue 1244).
    • ReadOnlyRoutingList now gets updated without throwing an error on the first run (issue 518).
    • Test-Resource fixed to report whether ReadOnlyRoutingList desired state has been reached correctly (issue 1305).
  • Changes to SqlDatabaseDefaultLocation
    • No longer does the Test-TargetResource fail on the second test run when the backup file path was changed, and the path was ending with a backslash (issue 1307).
StorageDsc 4.6.0.0
  • Fix example publish to PowerShell Gallery by adding gallery_api environment variable to AppVeyor.yml – fixes Issue 202.
  • Added “DscResourcesToExport” to manifest to improve information in PowerShell Gallery and removed wildcards from “FunctionsToExport”, “CmdletsToExport”, “VariablesToExport” and “AliasesToExport” – fixes Issue 192.
  • Clean up module manifest to correct Author and Company – fixes Issue 191.
  • Correct unit tests for DiskAccessPath to test exact number of mocks called – fixes Issue 199.
  • Disk:
    • Added minimum timetowate of 3s after new-partition using the while loop. The problem occurs when the partition is created and the format-volume is attempted before the volume has completed. There appears to be no property to determine if the partition is sufficiently ready to format and it will often format as a raw volume when the error occurs – fixes Issue 85.
xActiveDirectory 2.25.0.0
  • Added xADReplicationSiteLink
    • New resource added to facilitate replication between AD sites
  • Updated xADObjectPermissionEntry to use AD: which is more generic when using Get-Acl and Set-Acl than using Microsoft.ActiveDirectory.Management\ActiveDirectory:://RootDSE/
  • Changes to xADComputer
    • Minor clean up of unit tests.
  • Changes to xADUser
    • Added TrustedForDelegation parameter to xADUser to support enabling/disabling Kerberos delegation
    • Minor clean up of unit tests.
  • Added Ensure Read property to xADDomainController to fix Get-TargetResource return bug (issue 155).
    • Updated readme and add release notes
  • Updated xADGroup to support group membership from multiple domains (issue 152). Robert Biddle (@robbiddle) and Jan-Hendrik Peters (@nyanhp)
xPSDesiredStateConfiguration 8.6.0.0
  • Fixes style inconsistencies in PublishModulesAndMofsToPullServer.psm1. issue 530
  • Suppresses forced Verbose output in MSFT_xArchive.EndToEnd.Tests.ps1, MSFT_xDSCWebService.Integration.tests.ps1, MSFT_xPackageResource.Integration.Tests.ps1, MSFT_xRemoteFile.Tests.ps1, MSFT_xUserResource.Integration.Tests.ps1, MSFT_xWindowsProcess.Integration.Tests.ps1, and xFileUpload.Integration.Tests.ps1. issue 514
  • Fixes issue in xGroupResource Integration tests where the tests would fail if the System.DirectoryServices.AccountManagement namespace was not loaded.
  • Tests\Integration\MSFT_xDSCWebService.Integration.tests.ps1:
    • Fixes issue where tests fail if a self signed certificate for DSC does not already exist. issue 581
  • Fixes all instances of the following PSScriptAnalyzer issues:
    • PSUseOutputTypeCorrectly
    • PSAvoidUsingConvertToSecureStringWithPlainText
    • PSPossibleIncorrectComparisonWithNull
    • PSAvoidDefaultValueForMandatoryParameter
    • PSAvoidUsingInvokeExpression
    • PSUseDeclaredVarsMoreThanAssignments
    • PSAvoidGlobalVars
  • xPackage and xMsiPackage
    • Add an ability to ignore a pending reboot if requested by package installation.
  • xRemoteFile
    • Updated MatchSource description in README.md. issue 409
    • Improved layout of MOF file to move description left.
    • Added function help for all functions.
    • Moved New-InvalidDataException to CommonResourceHelper.psm1. issue 544
  • Added full stops to the end of all functions help in CommonResourceHelper.psm1.
  • Added unit tests for New-InvalidArgumentException, New-InvalidDataException and New-InvalidOperationException CommonResourceHelper.psm1 functions.
  • Changes to MSFT_xDSCWebService
    • Fixed issue 528 : Unable to disable selfsigned certificates using AcceptSelfSignedCertificates=$false
    • Fixed issue 460 : Redeploy DSC Pull Server fails with error
  • Opt-in to the following Meta tests:
    • Common Tests – Custom Script Analyzer Rules
    • Common Tests – Flagged Script Analyzer Rules
    • Common Tests – New Error-Level Script Analyzer Rules
    • Common Tests – Relative Path Length
    • Common Tests – Required Script Analyzer Rules
    • Common Tests – Validate Markdown Links
  • Add .markdownlint.json file using settings from here as a starting point.
  • Changes to Tests\Unit\MSFT_xMsiPackage.Tests.ps1
    • Fixes issue where tests fail if executed from a drive other than C:. issue 573
  • Changes to Tests\Integration\xWindowsOptionalFeatureSet.Integration.Tests.ps1
    • Fixes issue where tests fail if a Windows Optional Feature that is expected to be disabled has a feature state of “DisabledWithPayloadRemoved”. issue 586
  • Changes to Tests\Unit\MSFT_xPackageResource.Tests.ps1
    • Fixes issue where tests fail if run from a folder that contains spaces. issue 580
  • Changes to test helper Enter-DscResourceTestEnvironment so that it only updates DSCResource.Tests when it is longer than 60 minutes since it was last pulled. This is to improve performance of test execution and reduce the likelihood of connectivity issues caused by inability to pull DSCResource.Tests. issue 505
  • Updated CommonTestHelper.psm1 to resolve style guideline violations.
  • Adds helper functions for use when creating test administrator user accounts, and updates the following tests to use credentials created with these functions:
    • MSFT_xScriptResource.Integration.Tests.ps1
    • MSFT_xServiceResource.Integration.Tests.ps1
    • MSFT_xWindowsProcess.Integration.Tests.ps1
    • xServiceSet.Integration.Tests.ps1
  • Fixes the following issues:
xSMBShare 2.2.0.0
  • Improved Code logic & cosmetic changes
  • Update appveyor.yml to use the default template.
  • Added default template files .codecov.yml, .gitattributes, and .gitignore, and .vscode folder.
  • Changes to xSmbShare
xWindowsUpdate 2.8.0.0
  • xWindowsUpdateAgent: Fixed verbose statement returning incorrect variable
  • Tests no longer fail on Assert-VerifiableMocks, these are now renamed to Assert-VerifiableMock (breaking change in Pester v4).
  • README.md has been updated with correct description of the resources (issue 58).
  • Updated appveyor.yml to use the correct parameters to call the test framework.
  • Update appveyor.yml to use the default template.
  • Added default template files .gitattributes, and .gitignore, and .vscode folder.
xWinEventLog 1.3.0.0
  • THIS MODULE HAS BEEN DEPRECATED. It will no longer be released. Please use the “WinEventLog” resource in ComputerManagementDsc instead.
  • Update appveyor.yml to use the default template.
  • Added default template files .codecov.yml, .gitattributes, and .gitignore, and .vscode folder.

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 starting in WMF 5.0) to find modules with DSC Resources:

#To list all modules that tagged as DSCResourceKit
Find-Module -Tag DSCResourceKit 
#To list all DSC resources from all sources
Find-DscResource

Please note only those modules released by the PowerShell Team are currently considered part of the ‘DSC Resource Kit’ regardless of the presence of the ‘DSC Resource Kit’ tag in the PowerShell Gallery.

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 CertificateDsc module, go to: https://github.com/PowerShell/CertificateDsc.

All DSC modules are also listed as submodules of the DscResources repository in the DscResources folder and 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 Kragenbrink Software Engineer PowerShell DSC Team @katiedsc (Twitter) @kwirkykat (GitHub)

2 comments

Discussion is closed. Login to edit/delete existing comments.

  • Bryan Dady 0

    Hi Katie, et. al.,The code copies show a bunch of HTML tags that make the PowerShell examples hard to read.For example:
    <span class=”pl-c”><span class=”pl-c”>#</span> To list all modules that tagged as DSCResourceKit</span><span class=”pl-c1″>Find-Module</span> <span class=”pl-k”>-</span>Tag DSCResourceKit <span class=”pl-c”><span class=”pl-c”>#</span> To list all DSC resources from all sources </span><span class=”pl-c1″>Find-DscResource</span>.I hope that’s fairly easy to cleanup; I’m looking forward to the next batch of updates later this week!

    • Katie Kragenbrink Microsoft employee 0

      Thanks! Should be fixed now both here and in the newest DSC Resource Kit release blog.

Feedback usabilla icon