When a user establishes a Remote Desktop connection to the server this connection will remain active until the user selects “Log Off” from the Start Menu. As such, if a user simply closes the remote desktop window when they’re finished with the server, that username will remain logged on.
The software running on the server to facilitate the Remote Desktop connection will allow for up to two simultaneous administrative sessions.
If a third attempt is made to login to the server, the error discussed here will be shown to the user, and they will be unable to complete the login process.
Here’s a command line hack that you can use to figure out what sessions are connected to the server. Note that you could substitute the IP address for the server name.
query session /server:servername
Now we know that the session ID of the offending session is 2. We can use that in the next step, which is using the reset command to log off that user.
reset session [ID] /server:servername
This command won’t display any output, but when we run the query command again, we should see that the session has now been disconnected: