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 11/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. 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
When on Power
When on Battery
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.