One of the most annoying features in Windows 10 for desktop computers is the sleep timeout, which is the time period after which your computer enters energy-saving sleep mode. This time period can be too long for some users, making it difficult to leave their computers open to check on something later.
For some, it’s a drawback because it drains on the battery, which can get in the way of your work if you have a lot to do. While you can use Power Options’ user interface, here is how to do it quickly using the powercfg command-line tool in Windows 10.
Change Sleep Timeout using PowerCFG
If you want to disable the computer’s sleep timeout or standby quickly, then execute the following command. It will change the setting for the current power profile. Make sure to execute them on command prompt or PowerShell with admin permission.
powercfg /change standby-timeout-ac 0 powercfg /change standby-timeout-dc 0
If you want to change it for any of the existing plans, we will need to use GUIDs of the schemes and AC and DC parameters. You can also use this command to set the timeout in minutes.
The first step is to run the powercfg /list to find all the GUIDs of the Power Schemes on the computer.
Next, execute the below-mentioned command by replacing <Power Scheme GUID> and <minutes> with appropriate values.
Also note that the setacvalueindex is when the computer is plugged, and setdcvalueindex is when it’s on battery.
When on Power
powercfg -setacvalueindex <Power Scheme GUID> 238c9fa8-0aad-41ed-83f4-97be242c8f20 29f6c1db-86da-48c5-9fdb-f2b67b1f44da <minutes>
When on Battery
powercfg -setdcvalueindex <Power Scheme GUID> 238c9fa8-0aad-41ed-83f4-97be242c8f20 29f6c1db-86da-48c5-9fdb-f2b67b1f44da <minutes>
I hope the post helped you change the sleep timeout using the powercfg command. It would be best to create a batch file and execute it with admin permission every time you need to change it.