A set method changes a configuration resource when its current state differs from the desired state. It normally follows a test method, which checks for drift during each evaluation. section 8.9
Mistake #1: treating configuration management as irrelevant to SQL Server.
- A recurring DSC check can test whether xp_cmdshell is disabled; when drift is found, the set method disables it instead of leaving the instance out of compliance. section 8.9
- Use the set method as part of a resource and manifest, rather than as an isolated manual change; this improves consistency, reduces effort, and supports compliance. section 8.9
Applying the desired state
After defining a DSC configuration, apply the compiled resources with Start-DscConfiguration -Path 'C:\dsc\InstallSql' -Verbose. The resource's test method determines whether its set method needs to run. section 8.9
Figure 8.3 Configuration management process
Follow the configuration-management process from state testing through conditional state correction across SQL Server hosts. section 8.9
