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.
Anyone have a solution for this?
The config is being kicked off as follows:
Start-DscConfiguration -ComputerName $ScriptComputerName -Path $configurationLocation -Wait -Force -Verbose