PowerShell Version 5 New Feature: New Parameters added to the New-DscCheckSum and Test-DscConfiguration Cmdlets

I’m continuing on my series of blog articles on the new features in the preview version of PowerShell version 5. Today I’ll be discussing the existing DSC (Desired State Configuration) cmdlets in PowerShell version 4 that now have new parameters as of the May 2014 preview version of PowerShell version 5.

To begin, I’ll define a DSC configuration that’s parameterized so that it’s reusable:


Run the configuration specifying the computer names to create MOF files for:


In the preview version of PowerShell version 5,  the New-DscCheckSum cmdlet now has a WhatIf parameter:


A Confirm parameter has also been added to the New-DscCheckSum cmdlet:


Verify the state of the specific features and services on the servers:


Apply the DSC configuration:


Check the status of the features and services again:


Test the DSC configuration using the Test-DscConfiguration cmdlet:


Note: In the previous example, the CimSession parameter is used even though there isn’t a CimSession to SQL01 and WEB01. The computer names can simply be specified in this scenario. This isn’t a new feature as this works in PowerShell version 4 as well, but it is something to be aware of so that you don’t necessarily have to create a CimSession first.

Detailed parameter has been added to the Test-DscConfiguration cmdlet in the PowerShell version 5 preview:



This blog article has been written based on the preview version of PowerShell version 5 from the May 2014 release of the Windows Management Framework 5.0 preview so what you’ve seen here is subject to change in the final release version.

This blog article is one of many that I’ve written and will be writing about the new features in PowerShell version 5. You can find my other blog articles on PowerShell version 5 here.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: