• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 9134
  • Last Modified:

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.
0
dfw_computer_geek
Asked:
dfw_computer_geek
  • 5
  • 4
  • 2
  • +2
1 Solution
 
NeilParbrookCommented:
You could just add a schedualed task to run shutdown /r and the time you require.

0
 
weben74Commented:
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
0
 
dfw_computer_geekAuthor Commented:
So how would I reboot it if I wanted to schedule the reboot for 11 hours from now?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
TonyStCommented:
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/
0
 
dfw_computer_geekAuthor Commented:
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?
0
 
TonyStCommented:
That will make the system shutdown and restart immediately.  Is that what you want to do ??
0
 
dfw_computer_geekAuthor Commented:
Yes,  I want to schedule a time (hopefully with the scheduled tasks) then set it to shutdown and immediately reboot.
0
 
TS_MikeHCommented:
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.
0
 
TonyStCommented:
TS MikeH

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

Good command, just tried it on my Windows2003 Domain Controller.  Works perfect
0
 
dfw_computer_geekAuthor Commented:
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
0
 
TonyStCommented:
put the command into a batch file   REBOOT.BAT and then schedule the batch file to run at 9:00pm
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

  • 5
  • 4
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now