Add documentation and samples
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
ebdcc0ecab
commit
33ac1031d9
2 changed files with 23 additions and 0 deletions
23
README.md
Normal file
23
README.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
# LockIfOutOfLogonHours - Lock Windows User Desktop When Logon Hours Denied
|
||||
|
||||
LockIfOutOfLogonHours is a small utility to test if the invoking user is within permitted logon hours or not.
|
||||
|
||||
If not, the utility locks the user desktop, locking the user out but not killing users' work.
|
||||
|
||||
If logon hours are to expire within 10 minutes, a prompt is displayed encouraging the user to finish her/his work in time.
|
||||
|
||||
## Running
|
||||
|
||||
Use Task Scheduler to schedule the `LockIfOutOfLogonHours.exe` to run periodically as the interactive user.
|
||||
|
||||
Active Directory allows configuring logon hours rounded to the whole hours only. Therefore, it makes sense to trigger the `LockIfOutOfLogonHours.exe` to run:
|
||||
|
||||
- Sometime before the hour is out (up to 10 minutes before the hour is out, e.g. 0:55, 1:55, ..., 23:55). This trigger notifies the user.
|
||||
|
||||
- At or just after the hour is out (e.g. 0:01, 1:01, ..., 23:01). This trigger locks the user out.
|
||||
|
||||
A sample task XML to be imported in Task Scheduler can be found in [`samples\LockIfOutOfLogonHours.xml`](samples/LockIfOutOfLogonHours.xml).
|
||||
|
||||
## Building
|
||||
|
||||
Microsoft Visual Studio 2019 is required.
|
BIN
samples/LockIfOutOfLogonHours.xml
Normal file
BIN
samples/LockIfOutOfLogonHours.xml
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue