Chapter 18. Desired State Configuration
This chapter covers
- The need for Desired State Configuration (DSC)
- Configuration management theory
- DSC architecture
- DSC modes: push and pull
- Local configuration manager
- Partial configurations
Make it so!
Captain Jean-Luc Picard, USS Enterprise-D
The need to build and configure servers quickly in a consistent, repeatable manner has been a longstanding problem in IT. One solution is to adopt Desired State Configuration (DSC), a PowerShell extension introduced with Windows Server 2012 R2 (PowerShell v4) and extended in Windows Server 2016 (PowerShell v5). DSC provides a mechanism to manage the configuration of your server estate, including:
- Add or remove Windows features
- Manage registry, files, and folders
- Manage processes and services
- Install and manage software packages
In addition, DSC can monitor the server configuration you’ve applied and, if necessary, reset the configuration to the desired state if the current configuration has been modified so that it doesn’t match the desired state. DSC can also be configured to manage reboots required by configuration changes.
In this chapter, we’ll introduce you to DSC. We’ll start by explaining the need for DSC and going over the underlying theory of configuration management. After reviewing the architecture of DSC, we’ll demonstrate how it works with examples.