Schedule a Computer/Laptop to shutdown With Command Prompt
Note: On the second step CMD use seconds to measure time, not minutes. If you want to shutdown the computer for 10 minutes, use 600 seconds and if you want to shutdown 10 hours, use 3,6000. You can choose whatever you want. To cancel your computer shutdown automatically, cancel it by opening the Command Prompt and typing shutdown -a. and Enter.
Using Task Scheduler to Set up Shutdown Timer
Note: with using Task Scheduler you can set shutdown timer for multiple uses (like daily or weekly), by using Task Scheduler you don't have to set things up all the time.
Using PowerShell to set Shutdown timer
Start-Sleep -s ##; Stop-Computer - ComputerName localhost
-s = Seconds
## = Number of Seconds (Replace this sign with the time you want)
ComputerName = Just use ComputerName if for the local computer or specify the computer name you wish to shutdown.
3. and then Enter.
Note: Make sure no application is open to run shutdown timer from PowerShell because this will shutdown your computer immediately.
Set Up Shutdown Timer With Run Command
1. Open run with the command "Windows+R".
2. On the Run dialog box, type
Shutdown -s -t 1200
1200 seconds you can change with time you want and Enter/OK.
I hope this article about making a shutdown timer can help your work, you can also change Windows Sleep times on your computer.