PowerShell DSC Resources

Sections

Desired State Configuration (DSC) is a configuration framework in PowerShell that enables you to manage your infrastructure with configuration as code.

DSC resources are similar to Puppet resources — they let you specify the desired state of an item on a node you managed. These resources can be small, such as xInternetExplorerHomePage, or large, such as xExchange. The PowerShell Gallery is a repository for finding and sharing DSC resources — similar to Puppet Forge.

Managing DSC resources with Puppet

Puppet allows you to manage DSC resources directly by installing them from Puppet Forge. Once you have added the DSC module to your Puppetfile and deployed it to your code base, you can declare the DSC resources. For example, if you deploy the dsc-xinternetexplorerhomepage module, you declare the resources in your Puppet code like this:
dsc_xinternetexplorerhomepage { 'homepage':
  dsc_ensure    => 'Present',
  dsc_startpage => 'https://puppet.com',
}

The dsc-xexchange module allows you to manage an entire MS Exchange server using resource types and parameters for configuration.

You can find all of the PowerShell DSC modules on the Forge. Install them and use them like you would any other Puppet module.

Puppet’s support policy for PowerShell DSC modules

The PowerShell DSC modules are different from other modules on the Forge. DSC Modules are auto-generated and mostly consist of vendored code that is not owned by Puppet. While Puppet supports the modules, it does not support the vendored DSC content inside the module. This support policy means that:

  • Puppet supports the translation layer between Puppet and DSC.

  • Puppet supports the build of the auto-generated modules, including private modules.

  • Puppet ensures that the tool accurately converts PowerShell modules with DSC Resources into Puppet modules.

  • Puppet does not provide support for bugs or features of PowerShell modules and their DSC Resources. If you pass the correct values to DSC but the resource is failing or behaving unexpectedly, report the issue to the DSC maintainers.

How helpful was this page?

If you leave us your email, we may contact you regarding your feedback. For more information on how Puppet uses your personal information, see our privacy policy.

Puppet sites use proprietary and third-party cookies. By using our sites, you agree to our cookie policy.