How to Schedule Automatic Computer Shutdown with Group Policy
- Last updated: Jun 18, 2025
In corporate environments, it's all too common for users to forget to shut down their computers before leaving the office. To address this—and in the interest of saving our planet (and perhaps even a few dolphins)—you can use a Group Policy Object (GPO) to automatically shut down computers at a scheduled time.
Create a Group Policy Object
- On a Domain Controller, open the Active Directory Users and Computers management console:

- Move the users for whom you want to enable automatic shutdown into an appropriate Organizational Unit (OU):

- Next, open the Group Policy Management console:

- Right-click the target OU, then select Create a GPO in this domain, and Link it here…

- Assign a name to the new GPO:

- Edit the GPO to configure its settings:

- Navigate to User Configuration > Preferences > Control Panel Settings, then right-click on Scheduled Tasks and choose New > Scheduled Task (At least Windows 7):

Configure the Group Policy Object
- Set the properties of the New Task as follows:
- Action: Create
- Name: Auto_Shutdown
- User Account: System (⚠️ Type it manually; do not use the "Change User or Group… button.⚠️)

- Under the Triggers tab, click New:

- Set the time when the computers should shut down:

- In the Actions tab, click on New:

- Define the properties of the New Action as follows:
- Action: Start a program
- Program/script: C:\Windows\System32\shutdown.exe
- Add arguments(optional): /s /t 0

- In the Conditions tab, configure the task to avoid shutting down if a user is still active:
This ensures that shutdown only occurs when the computer is idle, preventing interruption during user activity (e.g. working overtime).

Verify from a User Workstation
- On a workstation, open the Task Scheduler with administrator privileges. (Without admin rights, the task may not be visible.) You should see the Auto_Shutdown task listed:

Note: To prevent the task from being deployed on servers, consider using WMI Filters to ensure the GPO applies only to client workstations.