Has anyone here used DSC to automatically confgure their windows server ? I am thinking of adding some custom VARs to my windows template that will configure DSC and pull a configuration from my DSC pull server. I am thinking I can spin up AD domain when needed just by making a few changes to my templates. Have anybody here have any experiences trying to accomplish this?
I’ve used DSC to set security hardening on windows, but I didn’t use a pull server, just using the LCM in standalone mode. (This was because my windows deployments are used in multiple different environments, where a pull server might not be present). In my case I use a simple script to build the mofs and trigger the LCM for each of the compiled mofs to apply the settings. This script is called from context.ps1
This should definitely be doable, but you’ll need some method for your DSC to pick up context variables out of context.sh. (none of my states need to be parameterized in that way). I guess it might be possible to have context.ps1 set environment variables, and pick them up that way)