For the most part the following Windows command lines are used to easily reset any stuck Windows sessions:
Then to kill a session simply select the session ID and run:
Really Stuck Remote Desktop Sessions
The above solution will work 99% of the times, however once in a while there will be stuck session that you can’t kill. Rebooting the server will work, but will impact everyone on the server.
You may receive an error message similar:
The task you are trying to do can't be completed because Remote Desktop Services is currently busy. Please try again in a few minutes.
The alternative is to kill the winlogon.exe process for that session:
query process /ID:[SESSIONID]
Then force kill the process ID:
taskkill /f /PID [PROCESS_ID]