I wrote a powershell script that pushes a payload to a series of remote machines and installs it. The installation will probably take at least 10 minutes. During this time, I don’t want the remote machines to be able to restart or turn off, because that would interrupt the installation process and potentially make me unable to reinstall the application later.
What’s the best way of going about this?
Also, if I use -dontwait on Invoke-Command so I don’t have to wait for each machine to finish its particular installation, is it still possible to receive a return status for each of the installations to ensure they all were successful?