How can we stop a scheduled restart from happening? Sometimes we want to continue work and wish to delay the scheduled restart far more than the granted 15 minutes. What can we do in such a situation?
The first thing we should do is to go to the Microsoft Management Console (short MMC, mmc.exe) and add the "Services" snippet for the local machine. Now we can find the "Windows Update" service and set its status from "Running" to "Stopped".
It could be that this is already sufficient, however, in my experience the dialog will pop up again some time later (with less time for counter-actions, of course). Now its time to get our secret weapon: a PowerShell instance with administrative rights!
We need to stop the service wuauserv, which is the (currently running) Windows Update service. The difference to the former modification is that this time we are catching the currently running one and not the proposed one.
Stop-Service wuauserv
Another possibility is via the command line (again we need elevated rights). Basically the following command is equivalent to the previous one. So usually we should get a message that no such service is running.
net stop "windows update"
With these commands the imminent shutdown can be prevented.