Schedule Shutdown or Restarts in Windows

The Benefits of G Suite for Your Business (Why We Use It)
April 15, 2019
RDP lock downs
July 11, 2019

Schedule Shutdown or Restarts in Windows

Using the Task Scheduler, you can schedule computer to shut down at a certain time in the night or any time! And why might you want to do this? Maybe your computer is processing a task or maybe it is downloading files from the Internet, and you do not want to wait till then. You can then schedule it to shut down after say 2 hours, while you go on to catch up on your beauty sleep!

To make your computer shutdown at a particular time, type taskschd.msc is start search and hit Enter to open the Task Scheduler. In the right panel, click on Create Basic Task.

Give it name and a description if you wish and click Next.

When asked When do you want the task to start, select One time. Click Next.

Select the Start date and time.

Clicking Next will bring you to the Action page. Here select Start a program and click on Next.

Here type shutdown on the Program/script space and /s /f /t 0 in the Add arguments box. If you want the shutdown to commence after say 60 sec, type 60 instead of 0 here.

Schedule Shutdown or Restarts in Windows

NOTE: In a CMD window, you may run shutdown /? to see all the available switches. To schedule restarts, you need to use the /r parameter instead of the /s parameter. To log off the current user use /l.

How to shutdown domain users client computers with Group Policy

There are some organizations that require you to shutdown the computer at the end of business. Now what happens if that user would shutdown a system that is needed. Well lucky for us we can create a Group Policy Object (GPO) to do this. We are going to add a policy that only allows the management staff to power-off production computers.

  1. Log on to the Windows Server 2012 Active Directory domain controller with the Enterprise Admin or Domain Admin account.
  2. If not already started, initialize the Server Manager window from the bottom left corner of the screen.
  3. On the opened Server Managerwindow, go to the Tools menu from the menu bar.
  4. From the displayed list, click Group Policy Management.
  5. On the opened Group Policy Managementconsole, from the left pane, expandForest > Domains, and then expand the domain name. (MYDOMAIN.COM for this demonstration.).
  6. From the expanded list, right-click the domain name or the target OU, users of which you want to keep from shutting down the domain client computers on their own.
  7. From the displayed context menu, click the Create a GPO in this domain, and Link it here
  8. On the opened New GPObox, specify a self-explanatory name for the GPO in theName
  9. From the Source Starter GPOdrop-down list, choose a starter GPO of your choice if you have created any.
  10. Once done, click OKto create and link the new GPO to the target domain or OU.
  11. Once this is done, right-click the newly created GPO.
  12. From the displayed context menu, click Edit.
  13. On the opened Group Policy Object Editorsnap-in, from the left pane, under the Computer Configuration, locate and select PoliciesWindows Settings >Security Settings > Local Policies > User Rights Assignment.
  14. Once selected, from the right pane, double-click the Shut down the system
  15. On the opened Shut down the system Properties box, check Define these policy settings
  16. Click the enabled Add User or Group button and add the domain users or groups that you want to allow to shut down the client computers. (Domain Admins and Enterprise Admins for this demonstration.).Note:Only the users and groups added in this list will be able to shut down the system. All other users and groups will be automatically disallowed to shut the domain client computers down as soon as the policy becomes applicable.
  17. Back on the Shut down the system Properties box, click OK.
  18. Close the Group Policy Object Editorsnap-in.
  19. Press the Windowskeys simultaneously to initialize the Run command box.
  20. In the available field in the Run command box, type the GPUPDATE /FORCE command and press Enter key in order to update the group policy settings.