We’re pleased to announce that our PowerShell DSC module is now a fully supported Puppet module. For those who need a refresher, PowerShell Desired State Configuration (DSC) is a Microsoft technology that leverages PowerShell to deploy and manage configuration changes in your environment.
Our PowerShell DSC Module allows you to manage DSC resources with Puppet. The module generates Puppet Types based on each DSC resource MOF (Managed Object Format) schema file. The following DSC resources are already built and ready for use:
- All base DSC resources found in PowerShell 5. Note that PowerShell v5 is currently in production preview. (WMF 5.0)
- All DSC resources found in the Microsoft PowerShell DSC Resource Kit
With our supported PowerShell DSC module, you can leverage the 200+ DSC resources available from Microsoft while taking advantage of Puppet Enterprise’s rich management capabilities, including fine-grained access control (RBAC), monitoring and logging, and a host of Puppet apps — Node Manager, Code Manager, Configuration Manager and Application Orchestration. For mixed environments, Puppet Enterprise gives you a centralized management platform for managing all aspects of your infrastructure, whether that’s your Linux environments, Azure VMs, or your networking and storage devices.
With this supported release of the PowerShell DSC module, we also made some significant speed and system utilization improvements. In the prior version, every time a DSC resource was called a new PowerShell process was started, the DSC resource executed, and then the PowerShell process terminated. That meant if you had 10 different resources defined, you’d have to start and stop PowerShell 20 times to create them (one call to Test and another to Set). Starting and stopping processes not only increased the total execution time, but resulted in utilization spikes as each process was created and torn down. In the current release, we’ve implemented a shared PowerShell process that lasts for the duration of the Puppet run. Each DSC resource is executed in the same process, so only one PowerShell process is ever created, thereby reducing overall execution time and utilization.
Other improvements include:
- Invoke-DscResource cmdlet is used instead of Start-DscConfiguration, which results in faster execution times
- All DSC resources available from the PowerShell gallery are included with the Puppet module, and are safely loaded to prevent possible conflicts with other DSC resources that you may have already installed.
- DSC complex types like PSCredentials, hash tables and other embedded instance types are now supported. Additional validation improvements increase parsing robustness, so manifest errors can be identified prior to invoking DSC.
- Initiating a system reboot requested by a DSC resource is now supported
- Extraneous files were removed in the included DSC resources resulting in a significantly smaller footprint on disk
- There are now instructions to build Puppet types for your own custom DSC resources
We want to give a big shout out to Marc Sutter for creating the original DSC module and giving us feedback and support when needed. We’d also like to thank Jeffrey Snover and his team for their on-going input and support.
As always, we’d love to hear what you think so please download the module and give it a try.
James Pogran is a senior software engineer at Puppet Labs and author of Learning PowerShell DSC
- Download the Puppet Supported PowerShell DSC module
- See Bruce Payette and Ethan Brown’s PuppetConf 2015 talk Better Together: Managing Windows with Puppet PowerShell and DSC
- Watch the Windows DSC and WSUS webinar
- To learn more about PowerShell DSC, check out Learning PowerShell DSC by James Pogran