Skip to content

Set screen and sleep timeouts from the command line — via Microsoft Learn

Commandlow riskWindows 11Windows 10

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 15

Undo

rem Re-run with your previous minutes (0 = never). Check current values first with:
powercfg /query
Values are in minutes and apply to the active power plan. Other options: disk-timeout-ac/dc and hibernate-timeout-ac/dc.

Sources

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.

sleep timeoutscreen timeoutpowercfgdisplay offbattery

More in Performance & Power

Check memory pressure, not 'free RAM' — via Apple Support

Tricklow risk

A Mac that shows almost no free memory is usually fine: macOS keeps recently used files cached in RAM so apps reopen faster. The number that matters is the Memory Pressure graph in Activity Monitor, which combines free memory, swap and cached files.