Press X"win + R "to open the run dialog box.
Type “At 22:00 shutdown-s”in the dialog box (note: quotation marks are not entered. The “22:00”changes to the exact time you want to shut down your computer)
Then click "OK", and you’ll see a black system command run box flash to disappear, indicating success. This black frame is hard to capture...
#Undo the original automatic shutdown time
Type “Shutdown-a”in the dialog box. Note: No quotes are entered