Windows 2003 restart server script

Posted on 2004-04-07
Last Modified: 2012-06-27
I need a script that I can add to the Task Scheduler that will restart my windows 2003 server. I have tried a few but none seem to work.

Can anyone provide me with such a script?

Question by:Brad_nelson1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
LVL 10

Expert Comment

ID: 10778111
You even don't need any scripts.
1. Open Add Scheduled Tasks
2. Browse "C:\WINDOWS\system32\shutdown.exe"
3. Call it "Restatrt" and make a schedule.
4. Next screen: enter user name and password (admin rights)
5. Check "open advanced properties when I click finish" and click finish
6. Change "C:\WINDOWS\system32\shutdown.exe" to "C:\WINDOWS\system32\shutdown.exe -r -t 00"

All done

Author Comment

ID: 10778285
My windows 2003 server doesnt have shutdown.exe anywhere on the server.
LVL 10

Accepted Solution

vadim63 earned 125 total points
ID: 10778312
It should be: C:\WINDOWS\system32\shutdown.exe
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.


Expert Comment

ID: 10779641
If it is 2003, shutdown.exe should be there.  You sure it is 2003 Server?  Because 2000 Server does not have shutdown.exe.

Author Comment

ID: 10781578
Ya I made the mistake of looking on a windows 2000 server, I did find it on my windows 2003 server.

How can I do the same thing for windows 2000? Can I copy the shutdown.exe to the windows 2000 server?


Assisted Solution

jamesreddy earned 125 total points
ID: 10782468
I don't know if THAT one works for Windows 2000, but there is a shutdown.exe tool included in the Windows 2000 Resource Kit.  See below:

Expert Comment

ID: 10782500
Here is a free utility that also should work with Windows 2000.

Expert Comment

ID: 25540396
I need to do the same on my server.

Can some explain to me why I have to ammend the scheduled task to say as per suggestion above:

6. Change "C:\WINDOWS\system32\shutdown.exe" to "C:\WINDOWS\system32\shutdown.exe -r -t 00
In other words what does "-r -t 00" do to the shutdown command??? Do I need to add that?


Expert Comment

ID: 34422754
-r tells the server is a restart instead of a shutdown.
-t is time, 00 means now 60 would mean 60 seconds from now 3600 would be an hour from the time the command was executed

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to run the DNS query from the server? 5 90
setup share and NTFS permissions. 12 101
home folder path for users 4 112
Moving a windows 7 install to new hardware 9 181
by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question