Creating reusable DSC configurations

So far, we have been working with singular DSC configuration script files and DSC Configuration blocks. We have taken an approach of one DSC Configuration block per script file, and one script file per environment. We covered why this was best practice in the earlier sections, and at this point you've probably tried out a couple on your own using what we have done so far. You are likely realizing that these script files can grow very large, containing hundreds of lines of code with large sections of just DSC Resource declaration statements.

This is a common problem with CM. The world is complex and messy, and declaring it in text files sounds easy at first but becomes difficult to maintain if all you have is ...

Get Learning PowerShell DSC now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.