0

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.

4
  • 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? Commented Aug 31, 2020 at 17:57
  • I don't want it to wait. That's why I use /f. Why does it not respect anything I tell it to? Commented Aug 31, 2020 at 18:14
  • "force" simply means "don't let a program 'block' shutting down (e.g., Word with an unsaved document)"; it still will not 'crash' programs other than those that it detects are 'hung' ("Program has stopped responding" or "Something Occurred And Program is not interacting with Windows"). Commented Aug 31, 2020 at 18:18
  • 4
    "Is there really no way to actually force immediate restart/shutdown?" Yes, hold down the power button or pull the power cord. However, if you do this you could damage your system. There are good (safety) reasons why normal shutdown is not immediate.. Do you really want to damage your hard disks?
    – DavidPostill
    Commented Aug 31, 2020 at 18:38

1 Answer 1

0

As an alternative: for restart use shutdown /r /f /t 0. For shutdown use shutdown /s /f /t 0. The /t 0 flag will cause an immediate restart, /f forces all open application to close without waiting for a "proper" exit, so any unsaved data will be lost.

/p is similar to using the shutdown /s /t 0 command. /p can not be used with /t (or /m), but you can combine it with /f,

If you want a "full" shutdown you might want to consider using /sg instead of /s.

Note: This is a "shutdown procedure". It will case all processes to terminate more or less regularly in order to keep the data integrity including data that might be needed for a successful startup. If you don't care about that you can use David's suggestion. Or alternatively, just use a power cord with an off switch (that's what I do). Keep in mind: you might corrupt your data in a way so your machine won't start up again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .