I've been using this command to shut down Windows 10:
shutdown /p
And this to restart:
shutdown /r
Sadly, this kept causing Windows to not actually restart/shut down. Instead, it would show various messages such as "You are about to be logged out", "This system will restart in less than a minute" and various things like that.
So, I read the manual again and found the /f
flag. Now I started using:
shutdown /p /f
shutdown /r /f
But it doesn't force shutdown/restart at all. It keeps showing those messages and then it "eventually" restarts/shuts down.
The whole point of using the /f
flag was to force immediate restart/shutdown, but the commands are seemingly identical to their non-/f
versions.
When I use the "reboot" or "shutdown" command, I want it to reboot or shut down immediatly. Not wait for a random amount of time. It's as if it's ignoring the flag entirely. I don't understand it.
And due to the nature of these commands, debugging/testing variations is very obnoxious for obvious reasons.
Is there really no way to actually force immediate restart/shutdown? When I issue those commands, I have a reason for it.
shutdown
does an orderly shutdown; it "politely" closes foreground and background programs. If you have a lot of background stuff running, it can take a while to get it all properly closed. Are you certain that this is not what is causing your problem?