| CreateShutdownTask.ps1 | Creates an event that shutdowns the computer |
| CreateWarningTask.ps1 | Creates an event that issues a 10 minute warning prior to shutdown |
|---|
The scripts create a shutdown event that starts at 11:30PM on weekdays and 2:00AM on weekends and a warning event that runs 10 minutes before each shutdown issuing a warning to the user.
To install the scripts, use the following commands in a PowerShell:
powershell -ExecutionPolicy Bypass -File .\CreateShutdownTask.ps1
powershell -ExecutionPolicy Bypass -File .\CreateWarningTask.ps1NOTE: the waring event uses the msg.exe command which does not exist
in some version of Windows like the Home editions. You may have to
download an altnernative and specify it by path.