One day, an old computer with Windows 10 stopped shutting down, when I pressed the shutdown button, it started shutting down and after that the screen turned off and started up again, it wasn’t even a reboot, but just a Windows user logout/login.
If you hold down the Shift key and press Shut Down, the computer will turn off.
I launched the command line as Administrator and looked at the list of applications and drivers that could prevent the computer from shutting down or going to sleep:
powercfg /requests
DISPLAY:
No.
SYSTEM:
No.
AWAYMODE:
No.
PERFORMANCE:
No.
PERFBOOST:
No.
ACTIVELOCKSCREEN:
No.
In order not to waste time searching for the cause, I simply created a bat file with the command:
shutdown /s /f /t 0
To then shut down the PC by running this file.
/s – means shutting down the computer, /f – the most basic, forced termination of applications without warning, well, and /t 0, this is the time after which the command must be executed, scheduled for example, 0 means immediately, by default 30 seconds, you can specify 1 if the /f parameter does not work.
See also my article:
How to schedule shutdown Windows