Schedule shut-down of Cleint PCs on a W2008 Domain

Posted on 2012-08-17
Last Modified: 2012-08-21
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.
Question by:philwood12
    LVL 13

    Expert Comment

    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.
    LVL 6

    Accepted Solution

    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
    LVL 13

    Assisted Solution

    -r is a restart.  He wants a shutdown.  -f is force, yes I would agree to add that  :-)

    Author Comment

    This sounds good, but how do i create a scheduled task in GP?

    Featured Post

    Are your corporate email signatures appalling?

    Is it scary how unprofessional your email signatures look? Do users create their own terrible designs and give themselves stupid job titles? You can make this a lot easier for yourself by choosing an email signature management solution from Exclaimer today.

    Join & Write a Comment

    Suggested Solutions

    To effectively work with Diskpart on a Server Core, it is necessary to write some small batch script's, because you can't execute diskpart in a remote powershell session. To get startet, place the Diskpart batch script's into a share on your loca…
    If you migrate a Terminal Server licenses server inside the 2008 server family, you can takte advantage of the build-in migration tool. If you like to migrate an older 2003 Server (and the installed client CALs) to a 2008 R2 server for example, you …
    This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
    This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now