Shutdown -r -f -t 1
-
I saw an episode where the command was run to reboot a machine. I have been told by other admins that if you use the -f switch to force the restart then you must also use a -t switch with a parameter greater than 0 otherwise the -f switch is ignored. Can any of you guys confirm this just curious. Example shutdown -r -f -t 0 would not force hung apps to close but -r -f -t 1 would. Thanks.
-
Paul,
Interesting question! When you use the -t switch with anything greater than a 0 along with the -f switch; -f is implied. So this seems to indicate what you're hearing is right on track. Remember that the -f doesn't imply that you won't lose data but that you're forcing a shut down of apps without warning. This also implies that the -t 0 would shut down without shutting down apps.
Cordially,
Ronnie Wong
Host, ITProTV -
Paul,
I just wanted to chime in and verify this for you. My two go to commands are this:
Reboot immediately:
shutdown /f /r /t 0
Shutdown immediately:
shutdown /f /s /t 0
In both instances I use a "0" timer and the /f modifier works as expected. You can test it out pretty easily by opening a notepad window and typing something. Then, issue one of the above commands without saving the notepad document. You will see the server force close notepad and then shutdown or reboot.
Hope that helps,
Don Pezet
Host, ITProTV