QDS
asked on
Running/ Creating a batch file to run Shutdown.exe command
I want to schedule 3 servers on my network to reboot every monday @ 130 am.
shutdown \\computer1 /r at 13:30 /every:M
Is this syntax correct? How can i store this in a batch file to be called every monday?
Thank you
shutdown \\computer1 /r at 13:30 /every:M
Is this syntax correct? How can i store this in a batch file to be called every monday?
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for your quick response. This in on Win2k machines. What is -f stand for? Would my computer have be to be logged into, logged out and/ or locked to performed this??
ASKER
Also what would happen in in this case if there happened to be a program running? would these commands work?
/c and /y will take care of any programs running without stopping at any prompts.
I am not sure what the -f mentioned above does. I never have had to use that.
usually
shutdown \\computername /r /c /y will take care of it...
I am not sure what the -f mentioned above does. I never have had to use that.
usually
shutdown \\computername /r /c /y will take care of it...
They work no matter if locked or if no one is logged on.
f forcces applications to shut down.
But both of us forgot -m, the correct syntax would be
use shutdown -r -f -m \\computer
f forcces applications to shut down.
But both of us forgot -m, the correct syntax would be
use shutdown -r -f -m \\computer
An alternative: On each server set-up a scheduled task with this line:
tsshutdn /reboot
Task schduler = Start - Settings - Control Panel - Scheduled tasks.
more details on tsshutdn at http://support.microsoft.com/?kbid=320188
tsshutdn /reboot
Task schduler = Start - Settings - Control Panel - Scheduled tasks.
more details on tsshutdn at http://support.microsoft.com/?kbid=320188
I would recommend scheduling the bat file with the AT command, not the GUI interface of the Control Panel.
See http://support.microsoft.com/default.aspx?scid=kb;en-us;313565&sd=tech for a description of the AT command.
See http://support.microsoft.com/default.aspx?scid=kb;en-us;313565&sd=tech for a description of the AT command.
Why not try PowerOff from :
http://users.pandora.be/jbosman/applications.html
http://users.pandora.be/jbosman/applications.html
and put it into a batch. Let it be executed through scheduler at the appropriate times and use multiple schedules.
It has to be executed through an account that has admin rights remotely.