Copy batch file to an empty folder. Run with Administrator privileges
Hung remote desktop sessions can be killed using Wndows Remote Desktop Session Manager. This utility offers an alternate method which is quicker and simpler.
Run remote_desktop_sessions.bat. The list of active sessions will be listed and an option to kill a session by session ID. At the prompt enter the session ID to kill. You will then be presented with an updated session list.
Open license