Discussion Locked

Shutdown Server with Batch File

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
What syntax can be used a batch file to perform a shutdown and restart of a server?

5 replies

by vagab0nd

Use shutdown.exe from Resource Kit.
The syntax is following:

shutdown [\\computer] [/L] [/A] [/R] [/T:xx] ["Msg"] [/Y] [C]

\\computer - shutdowns remote computer
/L - local PC shutdown
/A - aborts shutdown. Works only in timeout period. All other switches ignored
/R - reboot after shutdown
/T:xx - timeout in sec, default is 20 sec
"Msg" - additional message
/Y - answers all following questions Yes
/C - forces all apps to close. Be careful with this switch as you won't see any promt for saving, it will just close all the apps

by curacao_dejavu

ok,
the previous answer is missing that you have to out it in a scheduler or use the at command (look in the windows help for the syntaxes" to schedule the shutdown.

Leopold

This discussion is closed to new replies.