Two modes:
- Keep system awake only
- Keep system and display awake
Interactive mode just run script
.\Prevent-Sleep.ps1Params mode
.\Prevent-Sleep.ps1 -Mode 2 -TimeoutMinutes 30 -LogPath C:\Temp\awake.log
# Keeps system and display awake for 30 minutes and logs activity.