Adding additional roles to DSC
So far, we've not seen anything particularly special about DSC. You could be forgiven for thinking that it is just another (very complicated) way of installing basic Windows roles. In this recipe, we will take this a bit further and look at some non-typical things we can do with DSC: we're going to configure our entire web server, and we're going to do it all using DSC providers.
We've already configured this web server several times in this book: we did it via the IIS console, then via PowerShell, then again as a container. Now, we'll do it via DSC.
Getting ready
To carry out this recipe, you need to have completed the previous recipe. We will be using the same Windows Server 2019 machine and building on its DSC configuration.
How to do it…
On your Windows Server machine, do the following:
- If not already open, open
C:\DSC\PacktWebServer.ps1
in Windows PowerShell ISE. - We should have our previous...