I’m surprised I couldn’t find anything on this via Google search.
Is there a foolproof way to make sure that no updates are installing when scripting a reboot of a computer? Or maybe MS has already put preventative measures in place to avoid bricking an OS by force-restarting it during a patch install…?
I know I can check the existence of an active msiexec.exe, but if it is there it’s possible it just hasn’t stopped yet, after a previous install has finished. I can’t figure out which Event ID is the one that says updates are installed and there are no more.
I can’t rely on a reboot required flag, since after installing 1 of several updates, it will flag as true.