Guides

The best ways to keep a Windows PC awake (2026)

Short answer

For a PC that should never sleep, set sleep to Never in Settings. For a one-off long task, use something that undoes itself: a PowerShell one-liner, Microsoft PowerToys Awake, or Keeplit. To keep a laptop running with the lid closed, change the lid action or use Keeplit, which does it only while plugged in. Avoid mouse-jiggler apps.

Which one to use

1. Change the sleep setting

Settings → System → Power & battery (Windows 10: Power & sleep), and set sleep when plugged in to Never. Simple and built in. The catch: it stays that way until you change it back.

2. One command: powercfg

powercfg /change standby-timeout-ac 0 does the same from a terminal; use standby-timeout-dc for battery. Handy in scripts, still permanent.

3. A PowerShell one-liner

A short loop that calls Windows' official SetThreadExecutionState keeps the PC awake for a set time and stops on its own. The copy-paste version is in the caffeinate for Windows guide.

4. Microsoft PowerToys Awake

Part of Microsoft's free PowerToys collection. It keeps the PC awake indefinitely, for a time, or until a time, from a tray icon. A good pick if you already use PowerToys. See Keeplit vs PowerToys Awake.

5. Keeplit

A small, free tray app from the Microsoft Store. Timed sessions like Awake, plus closed-lid support while the laptop is plugged in, battery safeguards, and your Windows settings put back when the session ends. It never connects to the internet.

What to avoid: mouse jigglers

Apps that move the mouse or press a key every few minutes do keep Windows awake, but they fake your activity: they can mark you as active in chat apps, interfere with what you're typing, and keep the screen on when it doesn't need to be. The official keep-awake request does the job without pretending to be you.

None of these can stop

Choosing Sleep yourself, pressing the power button, a critically low battery, or a policy set by your organization's IT. Keep-awake tools stop automatic sleep only.