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.
Shutdown -r -f -t 1
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.
Edutainer Manager, ITProTV
*if the post above has answered the question, please mark as solved.
**All "answers" and responses are offered "as is" and my opinion. There is no implied service, support, or guarantee by ITProTV.
I just wanted to chime in and verify this for you. My two go to commands are this:
shutdown /f /r /t 0
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,