| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
WorkTimer is a simple PowerShell script that enforce limited sessions. It runs a 1-hour countdown timer, gives spoken and visual notifications before time runs out, and logs out the user automatically. The script is designed to be run at user login and supports Cyrillic output.
WorkTimer.ps1 # Main PowerShell script with alert + logout logic WorkTimer.vbs # Helper VBScript to run the PowerShell script silently README.md # This documentation
To start a 1-hour session:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File WorkTimer.ps1This uses default alert thresholds: 10, 5, and 1 minute remaining.
Quick 15s run for testing (alerts at 10s, 5s, and 1s):
powershell.exe -NoProfile -ExecutionPolicy Bypass -File WorkTimer.ps1 -Test -VerboseIn test mode:
Quck 15s run for testing with logout:
powersherll.exe -NoProfile -ExecutionPolicy Bypass -File WorkTimer.ps1 -Test -Shutdown -Verbosepowershell.exe -File WorkTimer.ps1 -Thresholds @(900, 300, 60)This triggers alerts at 15, 5, and 1 minute remaining.
Each alert:
The script supports Unicode messages (e.g. Cyrillic).
To configure the script to run at user login using Task Scheduler:
This setup ensures the script runs silently via the .vbs wrapper each time user logs in.
You may need to allow script execution:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUserIf the script was downloaded:
Unblock-File -Path WorkTimer.ps1Or just bypass execution policy for this script:
powershell.exe -ExecutionPolicy Bypass -File WorkTimer.ps1The included WorkTimer.vbs allows you to launch the PowerShell script silently (no terminal window):
Set shell = CreateObject("WScript.Shell")
shell.Run "powershell -NoProfile -ExecutionPolicy Bypass -File C:\Scripts\WorkTimer.ps1", 0Useful for auto-start without interrupting the user.
MIT License. Use it, tweak it, improve it.
| Back | FazBrowse Home | New Git URL |