Set screen and sleep timeouts from the command line — via Microsoft Learn
Change when the display turns off and when the PC sleeps, separately for plugged in (ac) and battery (dc), without clicking through Settings. Handy in scripts or when Settings won't save the value.
Takes effect right away
Command
Run in a normal Command Prompt / Terminal window.
powercfg /change monitor-timeout-ac 10
powercfg /change monitor-timeout-dc 3
powercfg /change standby-timeout-ac 30
powercfg /change standby-timeout-dc 15Undo
rem Re-run with your previous minutes (0 = never). Check current values first with:
powercfg /queryValues are in minutes and apply to the active power plan. Other options:disk-timeout-ac/dcandhibernate-timeout-ac/dc.
Sources
- Powercfg command-line options — /change — by Microsoft Learn
- Source reviewed
- 2026-11-02
- Link checked
- 2026-11-02
- Tested hands-on
- Not by Oddbyte.Me
Oddbyte.Me hasn't tried this on every Windows build, so keep the undo handy.