View RSS Feed

TheScarfedOne

Shutting down machines with Group Policy Preferences

Rate this Entry
by , 29th September 2011 at 09:21 AM (42081 Views)
Ok, so - some of you have tried to put this in place and have not had much luck with it. I use this one a lot, as it saves additional software - and it is just nice to have everything all in one place.

How to do it properly then...

1 Create a NEW GPO... yes I said new. Don't go adding this to exisitng ones as when you want to change the time for different machines - you will be stuffed (well you could use item level targetting -but thats a bit out of the reach of this post)... and the second reason is more important though. For some reason - when you use GPO Scheduled Tasks - it breaks GPMCs way of showing the settings in that nice little HTML pane. At least if it is just these in there, you dont really need it.

2. Computer Config > Preferences > Control Panel Settings > Scheduled Tasks

blogs/thescarfedone/attachments/11478-shutting-down-machines-group-policy-preferences-gposhutdown.png

3. Right Click, New Task - and complete a la

blogs/thescarfedone/attachments/11480-shutting-down-machines-group-policy-preferences-gposhutdown1.png

4. Repeat as required - we have our machine set to wake on BIOS - so that is why there is a Weekday and Weekend Shutdown - the Weekend shutting down at 9.30am.

Enjoy :-)
Categories
Software

Comments

  1. burgemaster's Avatar
    Could an additional task be added previous to the shutdown to display a warning / cancel message?
  2. gerardsweeney's Avatar
    What burgemaster said

    Our current scheduled shutdown is a self-written AU3 script so that the users get a countdown to abort.
    Unfortunately it doesn't appear to work on Win7 so this might be very useful if you can get a warning/cancel message..
  3. TheScarfedOne's Avatar
    Rather than directly running shutdown.exe, what you could do is call a vbs script which displays a message box with a timeout in it (I use these kind of scripts for other things - like updating Start Menus), which then calls shutdown.exe.
  4. gerardsweeney's Avatar
    Quote Originally Posted by TheScarfedOne
    what you could do is call a vbs script which displays a message box with a timeout in it
    Yep, that's exactly what I do - only with AutoIt instead of VB as I prefer using AutoIt

    The only problem I had was that on XP, running as a scheduled task, you were not guaranteed to see the message screen pop up because of (I believe) the restrictions applied to Task Scheduler.

    I ended up running psexec included in the same folder as my AU3. The AU3 then calls PSEXEC which would then interact with the desktop..

    A complete dog's breakfast which I would probably do completely differently nowadays if I had the time, but at least it worked (works)

Trackbacks

Total Trackbacks 0
Trackback URL: