General discussion


Auto Restart of Windows

By dantheman55 ·
I have a computer in my office that houses data that other users on the network access during office hours. This is NOT a server, but acts like one on a peer-to-peer network. This computer is running Windows XP Professional. I need to restart this computer once or twice weekly. Is it possible to set something up so this computer restarts automatically when we are not in the office?


Dan Schoeffel

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

You probably need a script...

by azul In reply to Auto Restart of Windows

I have not used scripts much, I found a script on the MS TECHNET Script Center that is supposed to reboot a workstation. When I tested it, it didn't work but I am working on it.

Once there is a working script you can use Scheduled Task to run the script.

Below is the text for the script and the link to the MS site:


strComputer = "atl-dc-01"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Shutdown)}!\\" & _
strComputer & "\root\cimv2")

Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")

For Each objOperatingSystem in colOperatingSystems


Collapse -

shutdown (and) -r(estart)

by dhol In reply to Auto Restart of Windows

Hi Dan,

if you do not have a working solution yet, try a script with a single line command
shutdown -r
and hook that onto scheduled tasks.

Collapse -

Auto Restart of windows

by Wackymac In reply to Auto Restart of Windows

Yes I have to agree, I just tested it and all you need to do is:
Open notepad and type thhe Following:

echo off
shutdown.exe -r -t 00

once that is typed click file: Save as shutdown.bat amd and save where ever you will remember amd make sure to change Save as type to All Files.

Now click start>>All programs>>accessories>>system tools>>Schedule tasks and follow the instructions to set it up for a weekly reboot.


Collapse -

PSShutdown by Sysinternals

by Marty Hillman In reply to Auto Restart of Windows

A rather easy (albeit slightly more complicated) way of accomplishing this is to run the psshutdown command in a scheduled batch file.

I have one cheapo server that I use for IT Administration. After downloading PSTools from Sysinternals, I created a batch file to run the shutdown command remotely on all of our user machines. For a machine list, I used a simle text file listing all of the machines on my network. On the server, all you need to do is use Task Scheduler (under Programs | Acessories | System Tools) to schedule the batch file to be run at specific times after hours.

This accomplishes a couple of things. 1) My boss who is cost conscious of electricity use after hours is satisfied that computers aren't left on all night. 2) My security conscious paranoid self is assured that machines are not left logged in or powered on for extended periods. 3) Reboots required after system updates are actually performed rather than ignored by the user. 4) Any startup script modifications that I make are implemented on all machines.

The only safe computer is one not powered on. Since we are an 8 hour a day shop, this helps make sure that they are not vulnerable for at least 12 of those other hours.

Collapse -

One clarification

by Marty Hillman In reply to PSShutdown by Sysinternal ...

I may not have made it clear. Doing this on one box took care of the configuration for 50 workstations. The regular shutdown command is great, but it would be a box by box configuration. PSTools allows for one ocnfiguration in one location to affect all.

Collapse -

No Scripts Needed

by InquiredResults In reply to Auto Restart of Windows

In the command prompt of the ScheduledTasks program enter the following command:

C:\WINDOWS\SYSTEM32\CMD.EXE /C "shutdown.exe -f -r -t 0"

You can set the frequency of the reboots with the scheduler's schedule tab. This command will "force" the closing of any programs left open, so be sure to save and close what changes you would like to have on the next reboot. I use it nightly. Keeps my system on the top of its performance curve.


Collapse -

Auto restart...

by Lost Cause? In reply to Auto Restart of Windows

I guess that I need clarification on your issue. Is this a machine that is normally left powered on? or is this a machine that is normally left shut down and you need it to restart a couple of times per week...

Collapse -

restart computer

by traveler2005 In reply to Auto Restart of Windows

I have just down loaded some programs and the one that is best is no longer in business!!

the one I'm working with right now is called Auto Power On and Shut Down.
I just sent a message to the manufacture because it seems that it wants user assistance.

If I find out how to disable this feature I would say this software is excelent.

the addy

Good luck

Related Discussions

Related Forums