Link to home
Start Free TrialLog in
Avatar of StriderHiryu
StriderHiryuFlag for United States of America

asked on

Is there a way to automatically log off LOCAL Disconnected Windows sessions?

I have a number of users that will often use different PCs throughout their work week.  Many of them lock the PC they're using when they're done with it as opposed to logging off.  I've seen user sessions that have been logged into a PC for nearly a week.

This occupies resources on the PC that could be used by the person currently logged into the computer.  It also causes multiple bad password attempts from those workstations if a user changes their password on another PC.  The result in that case can be multiple lockouts of that person's account.

Is there a way to auto log off Disconnected sessions of local users?  To be clear, I know there is a group policy option to log off remotely connected users located at Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Session Time Limits > Set time limit for disconnected sessions.  I've tested this though and it does not seem to affect sessions that were logged on locally.
Avatar of 65td
65td
Flag of Canada image

Could create Scheduled task that logs off all session after hour such as 11:30 PM...
It's possible to create a scheduled task that runs "shutdown /l" after a specified number of minutes of inactivity.  The task schedule apparently only checks for "idle" every 15 minutes, so take that into account.

If the scheduled task is configured to start when a user logs on, it will wait for the specified amount of inactivity, and then run the "shutdown /l" script to log the user off.
Avatar of StriderHiryu

ASKER

Thanks for the replies.  65td, is that possible to do through built in settings within Task Scheduler, or would we need to write some kind of script and try to trigger that via TS?
ASKER CERTIFIED SOLUTION
Avatar of 65td
65td
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial