Link to home
Start Free TrialLog in
Avatar of dfw_computer_geek
dfw_computer_geek

asked on

Windows server command line reboot

I am trying to schedule my server for reboot from the command line for this evening.   I need a little help figuring out where I am messing up in the syntax.

(What I am entering)
shutdown /r /t 39600 /d P:2:17

After I enter this I get the usage help shot back at me.  This seems like I am missing something simple.
Avatar of NeilParbrook
NeilParbrook
Flag of United Kingdom of Great Britain and Northern Ireland image

You could just add a schedualed task to run shutdown /r and the time you require.

With the shutdown command line you cannot "schedule" a reboot.

The /t parameter must to be a number from 0 to 600 (seconds), only ten minuts!!!
The /d parameter is to indicate the reason of the reboot: /p planned /u user defined, but not to indicate the time.

Check for a third party software.

rgds
Avatar of dfw_computer_geek
dfw_computer_geek

ASKER

So how would I reboot it if I wanted to schedule the reboot for 11 hours from now?
I'm assuming that you want to be able to turn off your system and a specified time and then come back on by itself at a specified time.

check this out: http://www.drivermagician.com/autoshutdown/
So if I wanted to keep this simple and do this from a scheduled task would I have to create a batch file for the task to run to shutdown -r

If so what would my batch file look like or otherwise?
That will make the system shutdown and restart immediately.  Is that what you want to do ??
Yes,  I want to schedule a time (hopefully with the scheduled tasks) then set it to shutdown and immediately reboot.
Create a new scheduled task with the command :-

c:\WINDOWS\system32\shutdown.exe /r /f

And set the task to run when you need the server to reboot

The /f switch is useful as it will force the restart even if users have left applications open.
TS MikeH

c:\WINDOWS\system32\shutdown.exe /r /f

Good command, just tried it on my Windows2003 Domain Controller.  Works perfect
I want to schedule this at a specific time.   I know how reboot it from the command line I just don't know how to make it happen at 9pm this evening without actually sitting in front of the server and doing the command at 9pm
ASKER CERTIFIED SOLUTION
Avatar of TonySt
TonySt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial