Yes, Windows has automatic sleep options, but you are alone work relative to equipment downtime. The questions are always about how long you want the screen to turn off, or for the computer to go to sleep after you stop using it. They do not turn it off and you cannot choose an exact and specific time.
This is where this little trick comes in. It is rather a simple command to define the time in seconds that you want to pass before Windows closes the session and turns off your PC. You can run it from the command prompt, from Windows PowerShell, or create a desktop shortcut so you always have it on hand. Read on to find out how.
Let’s say that you are going to leave your computer unattended for a certain amount of time, but you don’t want to shut it down immediately just before you leave because you need Windows to complete some operation in the next few minutes or hours, be it download a file or whatever. With this command you can set the exact amount of time that will pass before the system shuts down completely.
Press the start button and type “command prompt” or “Windows PowerShell” in search to use either. In the console type: shutdown -s -t XXXX. The XXXX represent the time in seconds that you want to pass before the shutdown. If you want the computer to shut down in three hours, you would have to type shutdown -t -s 10800 and hit enter. If you want to cancel the shutdown, type the command shutdown -a In the terminal.
Create a shortcut for automatic shutdown
If you don’t want to use the terminal you can create a shortcut and leave it on the desktop to start the timer with a simple double click on an icon. To do this, right click on the desktop and select “New> Shortcut“
In the window that appears, type the command shutdown.exe -s -t XXXX. In the example above I have created an access to shut down the PC in 60 seconds.
Give your shortcut a name that is descriptive, you don’t want someone to be clicking there without knowing what that is about. Whenever you want start the timer you just have to double click on the icon that was created on the desktop.
You will see a warning message indicating the time in which Windows will close the session and turn off the computer.
Via | CNET
In Genbeta | How to make a Windows 10 computer a Wifi repeater