But to answer your question, you could install easily a group policy (either via local group policy editor or via GPO on your domain controller) to end disconnected sessions after a certain amount of time (minimum is 1 minute). By default Remote Desktop Services allows users to disconnect from a Remote Desktop Services session without logging off and ending the session.When a session is in a disconnected state running programs are kept active even though the user is no longer actively. This policy setting allows you to configure a time limit for disconnected Remote Desktop Services sessions.You can use this policy setting to specify the maximum amount of time that a disconnected session remains active on the server.