[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 609
  • Last Modified:

Schedule shut-down of Cleint PCs on a W2008 Domain

I'm trying to schedule all my client PCs to shut-down at a specific time every Friday.  Could anyone tell me the easiest way to do this?  Our DCs are W2008 server.  Clients are a mix of XP/Vista/W7.
0
philwood12
Asked:
philwood12
  • 2
2 Solutions
 
xDUCKxCommented:
Batch file would probably be best.

For EACH %%i IN <Textfile> DO
shutdown -m \\%%i -s 

Open in new window

You'll need a text file with each computer name, one per line (FQDN preferred) and the batch file will shutdown the computers.  

Make the batch file a scheduled task (after you've tested it...syntax of the "Shutdown" command changes in Windows 7/Vista somewhat)

Run the command "shutdown /?" from the command line to get the proper syntax.
0
 
arrorynCommented:
That seems admin heavy, as you need to tailor this each time a new machine is joined to the domain.

Create a scheduled task group policy, though you can still use the batch file you might be as well calling the application "c:\windows\system32\shutdown.exe" and if needs be with the parameters -f -r
0
 
xDUCKxCommented:
-r is a restart.  He wants a shutdown.  -f is force, yes I would agree to add that  :-)
0
 
philwood12Author Commented:
This sounds good, but how do i create a scheduled task in GP?
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

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