So I'm working on a PS Script to stand up new servers in our department. That is working great so far!
My question is this. When applying a DSC Config (via Push) and it requires the box to restart, is there anyway to make the PS script sit there and wait, and reconnect to show me the rest of the output? It seems after the reboot, the config automagically kicks in again, so that's not the problem. The problem is there can be no "I'm Done!" message to the person running the script if the reboot kicks off, and it does the rest under the covers.
I ended up adding a SendEmail DSC Resource to just send out an email message when the config was complete. This seems to be doing the trick for the moment, but I'll definitely look into this as well. Thanks!
When the compute restarts being doing a Test-NetConnection until the serve comes back online. When the computer comes back online you can then do a Test-DscConfiguration to verify the server is compliant with your configuration. This will give a bit cleaner output than trying to pull the event logs.
The topic ‘Apply DSC Config (Push) with reboot required. Output?’ is closed to new replies.