Skip to content

wtxsuper/win_prevent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Prevent Sleep Powershell Script

Usage

Two modes:

  1. Keep system awake only
  2. Keep system and display awake

Interactive mode just run script

.\Prevent-Sleep.ps1

Params mode

.\Prevent-Sleep.ps1 -Mode 2 -TimeoutMinutes 30 -LogPath C:\Temp\awake.log
# Keeps system and display awake for 30 minutes and logs activity.

About

Prevents system sleep and/or display sleep on Windows using SetThreadExecutionState on kernel

Topics

Resources

Stars

Watchers

Forks

Contributors