How to schedule automatic shutdown with Group Policy

In companies it is quite common to see users forgetting to turn off their computers before leaving... To save our planet and some dolphins we can automaticaly shutdown computers at a specific time with group policy (GPO).

Create Group Policy Object

  • Open Active Directory Users and Computers :
Run Active Directory Users and Computers
  • Move Users to a OU (Organizational Unit) :
Run Active Directory Users and Computers
  • Open Group Policy Manager :
Run Group Policy Management Console
  • Create GPO and link it to the OU :
Create a GPO
  • Give a name to the new GPO :
Give name to a GPO
  • Edit the GPO :
Edit a GPO
  • Go to User Configuration > Preferences > Control Panel Settings > Scheduled Tasks > Right click > New > Scheduled Tasks (At least Windows 7)
GPO New Scheduled Task

Set Group Policy Object

  • Set the New Task Properties :
    • Action : Create
    • Name : Auto_Shutdown
    • User Account : System ( Just write it, don't use "Change User or Group..." button)
New Registry Properties
  • In Triggers Tab, click New :
New Task Properties New Trigger
  • In Actions Tab, click New :
New Task Properties
  • Set the New Action Properties :
    • Action : Start a program
    • Program/script : C:\Windows\System32\shutdown.exe
    • Add arguments(optional) : /s /t 0
New Trigger
  • In Conditions Tab :

It allows to avoid shutting down a computer if a user is still working.

Result

  • From a Workstation open the Task Scheduler with administrator rights (otherwise you won't see the task), you should see the Auto_Shutdown task.
Windows Task Scheduler

Note : I also recommend to use WMI Filters to apply only to Desktops profiles.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :