Normally IT users will connect to the servers using RDP/MSTSC to administer and configure their servers, However they will mostly leave their sessions and forget to log off after doing their work especially if its long task or they are used to connect to these servers on regular basis. This can cause several security issues as well as account problems especially if the user changed his password while there is a session logged on another sever.
You can easily Force log off of idle sessions on remote servers by creating a scheduled task on these servers. In the below example i would assume forcing idle sessions to log off after one hour.
To create the needed task you need to do the following:
- Open the Task Scheduler, Click Task Schedule library
- Create New Task
- Type the name of the task and select “Run with Highest Privilege” check box
- On the triggers click New and check “On Idle”
- From the Actions, Click New and choose the logoff.exe (The default path of the logoff.exe is C:WindowsSystem32)
- In the Conditions Tab, Set the idle time. In this example, the idle time is 1 Hour.