I know I am probably over-looking this command in the toolkit but I have not been able to find the command to force a reboot after a successful installation.
I have seen some reference online to “Restart-Computer -Force” but I am not sure if that will still return a successful exit code in the logs.
What is the best practice to force the reboot in the script? I know that I can force it when using in SCCM, but I will be running this deploy-application.exe manually for now.
Wasn’t sure if the Show-InstallationRestartPrompt would be able to actually force a reboot on timeout. But if that works, surely that’s a better alternative.
In Deploy-Application.ps1 in the Post-installation phase include this as the last action. The script will reboot the machine and quit the script properly. If you create logs (see config XML) you can actually see when the reboot happend.