Remote shutdown workstations

E

Emyeu

i have a set of more than 50 workstations (Windows 2000 Pro. & Windows XP
Pro.) which require to power-down everyday 10pm. How can i do it remotely &
schedule it to shutdown at 10pm regardless the machines is 'ON' or 'OFF'?

Thanks.
 
P

Pegasus \(MVP\)

Emyeu said:
i have a set of more than 50 workstations (Windows 2000 Pro. & Windows XP
Pro.) which require to power-down everyday 10pm. How can i do it remotely &
schedule it to shutdown at 10pm regardless the machines is 'ON' or 'OFF'?

Thanks.

- Create a list c:\PCs.txt of the NetBIOS names of the 50 PCs.
- Use the Task Scheduler to invoke this batch file at 10pm:

@echo off
for /F %%a in (c:\PCs.txt) do c:\tools\shutdown.exe \\%%a /Y /C

shutdown.exe comes with the Win2000 Resource Kit.

Why would you attempt to shut down a PC if it is already off?

Note that some people might consider your method heavy-handed,
especially when they work late and lose the work of a few hours
because you pull the rug from under them.
 
E

Emyeu

initially, i created a batch file with a list of eg. "shutdown -s -m
\\computername"
it does work fine in machines that are "ON", but if anyone machine is not
"ON" and is listed in the list.
The batch file will 'stop'.
The purpose of implement this cause some user did not power-down the
machines. There are no user by 10pm.
Can i remotely shutdown by specify the range of IP addresses?
 
P

Pegasus \(MVP\)

You can shut down machines by IP address or by NetBIOS name.

If a machine is turned off then the batch file will move on
to the next machine. If yours does not then there is
something wrong with it. Post it here so that we can
tell you how to fix it.
 
E

Emyeu

I have created a test.bat file with lsiting below,

shutdown -s -m \\computername1
shutdown -s -m \\computername2
shutdown -s -m \\computername3
shutdown -s -m \\computername4

Eg. if machine "computername3" is not power-on,it will stop at the command
"shutdown -s -m \\computername3".
That's it. It wouldn't move on to the next command.
 
P

Pegasus \(MVP\)

In my first reply I suggested you should use shutdown.exe
from the Win2000 Resource Kit (which is in line with the
newsgroup where you posted). It now seems you went
and used shutdown.exe from a WinXP PC, without ever
mentioning it.

Regardless of the version of shutdown.exe, I find that my
batch file will never stall, even when attempting to shut down
a PC that is turned off.

I suspect that you have a file called shutdown.bat on your
PC, and it's this file your running, not shutdown.exe. This
will obviously not work. Modify your batch file like so to
avoid falling into this trap:

%SystemRoot%\system32\shutdown.exe -s -m \\PC1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top