This VBScript can help to force automatic restarts to finish installing important updates.
Whenever after updates, the server does not reboot immediately. However if we remote into the server we will receive a notice that you have to restart the computer in three days. If the restart does not occur in three days, the computer displays a 15-minute countdown and then automatically restarts. By default, this automatic restart is delayed if the computer is locked, and the countdown will begin the next time that you sign in to the computer.
This script can help to force automatic restarts to finish installing important updates.
You can find more All-In-One Script Framework script samples at https://aka.ms/onescriptingallery