You want to force logoff users that are idle on a PC (e.g., a Windows RD server).
- First you will need to download the software from intelliadmin.
The software is called “idlelogoff”.
- Once the program is downloaded you can easily script your custom logoff need. Here are some examples of how it can be used:
Here is how it works, you call the program like this:
idlelogoff.exe [timeout] [action]
timeout – The number of idle seconds before the action is taken
action - [logoff / lock / shutdown] You can lock the workstation, log the user off, or shutdown the workstation.
If you wanted a user to get booted off after 5 minutes (300 Seconds) of no activity, You would call it like this:
idlelogoff.exe 300 LOGOFF
If you wanted it to lock the workstation after 30 seconds of no activity this would do the trick
idlelogoff.exe 30 LOCK
If you wanted it to shutdown the workstation after 30 seconds of no activity this would do it:
idlelogoff.exe 30 SHUTDOWN
It has some sanity checking for the timeout. Anything less than 10 seconds is set to 10 seconds.
This can be scripted via batch or vbs.
I recently set it to autostart on user logon via the Startup folder. You could also do this using a GPO, but this is a simpler example.
- Created shortcut of idlelogoff.exe
- set target = c:idlelogoffidlelogoff.exe 14400 LOGOFF
- placed shortcut in c:documents and settingsall usersstart menuprogramsstartup
This set an idle logoff time of 4 hours for ANYONE that logs into the machine. So if anyone is idle for that amount of time it logs them off automatically.