Shutdown PC

Soldato
Joined
6 May 2009
Posts
20,361
At the moment I run this on every new computer and set the bios to start at 6am and run this bat

at 23:55 /interactive /every:M,T,W,Th,F,S,Su C:\WINDOWS\system32\shutdown.exe -s -t 10

Is there a way of adding this to a startup bat without it creating duplicate tasks or setting computers to shtdown through group policy?
 
you could execute it FROM the server

psshutdown can shutdown all pc's in a text file..

ie

computersToShutdown.txt

pc1
pc2
pc3
 
Rather than having it run the shutdown command directly via a task, get it to run a batch file with the shutdown command in it via the task. that way you can alter the batch file, so you can change the time etc without having to create another task, you'll also be able to add in other commands prior to the shutdown. You can change the batch file easily with network logon scripting.

Anytime I've used a batch script to create a task it's always added in a new one, never overwriting an existing one even if it's identical.

Bledds idea is more sound though, you'd need an entire list of your client PC names but unless it's a mess it should be fairly easy to do.
 
to create a file with all the machines names in....

add this to the startup bat...

echo >\\server\sharedfolder\tempfolderfornames\%computername%

each pc that logs in, will create a file with their computername in that dir..


now you just do a dir /b > computers.txt in that dir and you have your file with a list of computers in it.
 
Back
Top Bottom