Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduling reboots 2

Status
Not open for further replies.

StressedTechie

Technical User
Jul 13, 2001
367
GB
Is it possible to schedule a reboot of the server at all. For instance I need to reboot the server after some general maintenance was completed the other night. Now I want to reboot the server this evening but a: I dont want to have to wait around for everyone to exit the server at 7pm and b: I dont want to have to connect remotely from home and perform the restart.

Is there a way I can just hit the scheduler with a script of somesort and schedule a reboot 30 mins before the backup kicks off tonight!

I have heard of PSshutdown but that was a "Googlization" I dont know how realiable this source is. It could send snapshots to a hacker for all I know!! ;)

Any ideas if there is a lazymans way of doing this!! ;)
 
On the resource cd you will find an app called shutdown.exe copy that to the server and create a batch file and put the following in it:

ECHO OFF
CLS
SHUTDOWN \\servername /R /T:30 /C


Schedule the batch file to run whenever you choose with windows scheduler. it will reboot the server with a 30 second delay.

Hope this helps,

RoadKi11
 
Thanks.

I think if it's a 2003 server you will find it in the C:\WINDOWS\system32 folder by default.
 
Quality! Yep just checked and there it is shutdown.exe
Right now its time to get writing a script

Thanks again guys! I just hope it comes up alright!
Cheers
 
Oh almost forgot. You need to specify a reason on 2003 server as it prompts you before it will allow a reboot, type shutdown.exe /? at the command prompt and it will list the switches.
 
Thats a good point porkchopexpress, however if he doesnt specify a reason it will still boot the box. Just when he goes to logon next time it ask why the box was booted.
 
Thanks Guys good point to remember I pressed shutdown.exe /? and noticed the switches availble are quite exstensive will give it a go anyway.

Thanks
ST
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top