A DSC configuration is a declarative PowerShell specification of desired server resources and settings. It describes the target state rather than a one-time sequence of manual changes. section 8.9
Mistake 1: treating SQL Server configuration as a manual task. A DSC resource tests the current state, then runs its set method only when drift is found. Repeating that check can enforce security and operational standards across multiple servers. section 8.9
A practical DSC configuration typically includes:
- Resources such as SQL instance setup and SQL configuration, with values for the desired state. section 8.9
- A node declaration identifying the target server and resource dependencies. section 8.9
- Compilation into a Managed Object Format document before application. section 8.9
Installing and enforcing a SQL instance
An InstallSql configuration can install a SQL instance, disable remote access, and create a login. Compile it with InstallSql -Edition Developer, then apply the generated configuration using Start-DscConfiguration -Path 'C:\dsc\InstallSql' -Verbose. section 8.9
Figure 8.3 Configuration management process
Use the process diagram to follow recurring test-and-set enforcement across SQL Server hosts. section 8.9
