ysskrishna logoysskrishna
Keep Windows Awake logo

Keep Windows Awake

macOS-style caffeinate for Windows PowerShell, no installer and nothing saved to disk.

Get it
Built with
Business & SaaS Apps
File & Path Utilities
Details
FreeMIT licenseCreated November 4, 2026Updated November 12, 2026
Share this product

Your long build is running. Windows still dims the screen.

You kicked off a deploy, a download, or a presentation rehearsal. The machine treats you like you walked away. The display sleeps. The room thinks you are done.

On macOS you would reach for caffeinate. On a locked-down Windows laptop, winget and installers are often off the table, and script files may not run at all.

Keep Windows Awake gives you a PowerShell command with the same flags you already know from macOS. Paste it into the window, set a timer or keep the display on, and stop with Ctrl+C. Nothing installs, nothing writes to disk, and a normal user session is enough.

Stay awake without begging IT for another installer.

What you get

  • Familiar flags. Use -d for display, -t for a timer in seconds, -w to stop when a process exits, and -i where it matches the macOS default behavior.
  • Paste-first setup. Copy the raw script from GitHub into PowerShell when file execution is blocked. Execution policy targets script files, not text you paste at the prompt, as Microsoft documents.
  • Honest limits. The README explains what SetThreadExecutionState cannot override: lid close, power button, screen saver, and Group Policy session locks each have their own section in the methods guide.
  • A map when IT says no. If PowerShell is in Constrained Language mode, the docs point you to Presentation Settings or power settings instead of pretending one trick fits every laptop.
  • macOS and Linux pointers. A separate guide covers built-in tools on other platforms when you switch machines mid-week.

Picture a one-hour screen share

You paste the command, run caffeinate with -d and -t 3600, and the display stays on through the demo. When the hour ends, Windows returns to its normal sleep rules. No leftover service, no mystery tray app.

Ready to try it?

Open PowerShell, copy the raw script from the repo, paste, then run the command with the flags you need.

Keep exploring

Frequently asked questions

Why not just change power settings forever?

You can, and the docs cover that path when installers and scripts are blocked. Keep Windows Awake is for a temporary hold: a build, a call, a test window. When you stop the command, normal sleep rules come back.

How do I keep my Windows PC awake during a long script without installing anything?

Copy the raw PowerShell script from GitHub into your session, then run caffeinate with -t and the seconds you need, or -d if the display must stay on. Press Ctrl+C to stop early.

Does pasting the script work when execution policy blocks files?

The README says pasting at the prompt works because execution policy applies to script files and profiles, not interactive text, per Microsoft. It does not work in Constrained Language mode; the command tells you in one line.

Can it stop my laptop from locking when Group Policy enforces inactivity?

No. A Group Policy inactivity lock is separate from sleep prevention. The methods guide labels that case explicitly so you do not waste time on the wrong tool.

What does the -w flag do?

It stops when the process ID you pass exits, matching the macOS caffeinate -w behavior described in the README.

Will it move my mouse or press keys?

No. It asks Windows not to sleep the way a video player does. It does not simulate user input.

Is it free?

Yes. It is open source under the MIT license.

Continue exploring

BlogCover image for The macOS Cheat Sheet I Actually Run Every Day

The macOS Cheat Sheet I Actually Run Every Day

macOS
Bash
4 min read
ProductDirectory Printer

Directory Printer

Pick a folder, get a clean tree you can copy or save. Ignore rules included.
File & Path Utilities
Business & SaaS Apps
Python
Tkinter
ProductVideo Extensions

Video Extensions

A fast, honest first filter when a filename might be video.
File & Path Utilities
PyPI Packages
Python
uv
ProductUnused Path

Unused Path

Stop overwriting downloads and exports. Get the next free filename, browser style.
File & Path Utilities
PyPI Packages
Python
uv
ProductText Extensions

Text Extensions

Know which paths look like text before you open them. One shared list, no list upkeep.
File & Path Utilities
PyPI Packages
Python
uv
ProductBinary Extensions

Binary Extensions

Know which paths look binary in Python, from a curated list of 250+ extensions with no extra dependencies.
File & Path Utilities
PyPI Packages
Python
uv