If you leave your Windows PC unattended and running, there will come a time when the operating system will go into the sleep mode. This is the default setting for the power management on a Windows PC. This setting saves unnecessary power wastage when the computer is not being used for long times.
But the same power settings become a problem if you want to download or upload a bunch of large files and leave your computer unattended overnight. Imagine, you started to upload a YouTube video to your YouTube channel and Windows decided that you are not using your PC and enters the sleep mode.
This problem is addressed by one of the Microsoft PowerToys called Awake. This tool stays in the notification are of the Windows desktop. We can right-click on this icon and choose to keep the computer awake. We can choose the duration for which the PC has to stay awake – 30 minutes, 1 hour, 2 hours and indefinitely.
In the settings for PowerToys Awake, we can choose to toggle the whole tool on or off. You can choose the mode in which this tool is to be used. There are two modes available – keep awake for a time interval or keep awake for indefinite period. We can also choose to keep the screen on without changing any Windows settings.
In addition to using this PowerToy using the GUI, we can also use it through the command line interface (CLI). We can run it using various parameters in the command line. For example, we can specify the process ID of a process to which it has to be attached through the command PowerToys.Awake.exe –pid 3498.
In this example, 3498 is the PID of the process to which it is attached. When that process is terminated, Awake is also terminated automatically. There are many more features available through the CLI interface.
You can download Microsoft PowerToys from https://github.com/microsoft/PowerToys.