This article gives different methods you can configure your Windows OS to automatically shut down, regardless of its state or processes running at that particular moment. There are 2 main methods to configure your PC to turn off automatically:

Why Schedule an Automatic Shutdown How to Automate Windows Shut Down Using the CLI (Run Command, Command Prompt, PowerShell) Using Task Scheduler Closing Words

Using the Windows Command Line Interface (CLI), which includes the Command Prompt, Windows PowerShell, and the Run Command box.Using the Task Scheduler.

Using the CLI, you can fix the time after the computer shuts down automatically. This time is calculated in seconds from the time you execute the cmdlet. In the case of the Task Scheduler, you can define what time the computer shuts down. This can be a one-time event, or you can pick the days when the computer shuts down automatically. But who needs to schedule a computer to shut down automatically when the power off button is right there in the Start Menu?

Why Schedule an Automatic Shutdown

Of course, you can simply shut down the computer manually when you are done with it. However, in certain scenarios, it may be beneficial to automate this job, especially when you are not around. The following can be those scenarios:

When a task/ process is running for which no human interaction is required. If you know the approximate time it will take for the task to complete (for example: installing software), you can schedule an automatic shutdown.When your system needs to run cron jobs (automated tasks) at a certain time during the day, you can configure it to shut down automatically afterward.If you occasionally forget to turn off your computer whilst leaving work or home, you can schedule it to power down automatically in case you missed it.If you want your OC to turn off at a certain time in case a child is using it. This is useful for parents wanting more control of the duration their child uses a PC.

If you find yourself in any one of these situations from time to time, continue reading this post to learn how to automate powering down your PC without any human input.

How to Automate Windows Shut Down

Using the CLI (Run Command, Command Prompt, PowerShell)

Using these 3 tools, i.e. the Run Command box, the Command Prompt, and Windows PowerShell, you can set a timer on how long after the computer will shut itself down. We have combined the 3 tools in one section as all 3 of these are CLI tools, plus they use the same cmdlet syntax. You can use the following cmdlet to automatically shut down the computer after a certain amount of time. The XXXX in the cmdlet denotes the time in seconds after which the computer will turn off. This timer starts as soon as the command is executed. The “-s” in the cmdlet indicates that the system is shut down completely, and the “-t” switch is used to specify the delay time. You can replace XXXX in the cmdlet with the number of seconds you want to delay the shutdown with. Here are a few examples of this cmdlet:

Shut down after 1 second: Shutdown -s -t 1 Shut down after 1 hour: Shutdown -s -t 3600 Shut down after 3 hours: Shutdown -s -t 10800 Shut down after 6 hours: Shutdown -s -t 21600

As you can see in the images below, these commands can be executed in the Command Prompt, Windows PowerShell, and the Run Command box. After running this cmdlet in either of the CLIs, you will see a notification such as the following, giving you the details of the sign-out/ shut down. If you change your mind about the automatic shut down before it has happened, you can cancel it at any time by running the following cmdlet in any of the CLIs: Running this cmdlet will show a similar notification in the Notification Center as in the image below:

Using Task Scheduler

You can also tell your computer what time to shut down, instead of putting down a timer, using the Task Scheduler. Moreover, you can also repeat this automation for any number of days. Perform the following steps to automate shutting down your PC using Task Scheduler: That is it! The task that you have just created will now automatically shut down the computer at the designated time of the designated day(s). Once that is done, check the box next to “Enabled” and click Ok. Next, type in the following in the text field under “Program/Script:” Now type in the following in the text field in front of “Add arguments (optional)” while replacing XXXX with the time delay you want to shut down the computer in. Note that the computer will automatically shut down after these many seconds after the time you have selected in step 5 above. When done, click Ok. Then click Ok. If, in the future, you want to disable this task and end the auto shut down of your Windows PC, simply return to the Task Scheduler, right-click on the task you had created, and click Delete from the context menu. If asked for a confirmation, click Yes.

Closing Words

For some computer geeks, the automatic shutdown feature can be a blessing. It can save their battery backup and conserve energy. In some instances, for example, running late on a weekend, you can schedule your PC to shut down automatically and take off yourself so your PC doesn’t keep running the entire weekend. Do let us hear about your experience with the automatic shut down feature of Windows and let us know when it has come in handy for you.