The purpose of this article is to show you how to log off users automatically after being disconnected for a certain amount of time. Sometimes users or employees in your company may forget to log off from the server, and their user account remains logged in consuming precious CPU cycles and memory. For example a server with 4GB of RAM would have a memory usage of 89% with 2 disconnected users and 1 logged in user compared to 59% memory usage with just 1 user logged in. This will significantly affect system performance because the page file will be used more actively starting at 75% memory usage.
Open the ‘Group Policy Editor‘ for your server.
Find the key ‘Set time limit for disconnected sessions‘.
By default it will have the value ‘Not configured’, change it to ‘Enabled‘.
Once the setting is set to ‘Enabled’, another field will become available in the lower left half of the window. Set ‘End a disconnected session‘ to the value you prefer. In my case I have set this to 8 hours, so a disconnected user is logged off after 8 hours.
Note: Setting the ‘End a disconnected session’ time value too low, may cause your work to be lost if your network connection drops. So definitely don’t set this to ‘1 minute’ or ‘5 minutes’.