From a mate of mine Norman Goh:
You need to connect to a specific Active Connection from another computer or your computer rebooted and left an active session which you cannot connect to. When you connect you get the following error message;
1. Login to the server using the following command to obtain console access. Substitute â€œconsoleâ€ for â€œadminâ€ if necessary to connect. Obviously run cmd to get the commandline.
a. mstsc /v:<SERVERNAME> /admin
2. Open Terminal Services Manager ==> This Computer ==> <SERVERNAME>
3. Find the active session you are interested in, right click on the session and then â€œDisconnectâ€ the user. Donâ€™t log the user off.
If you try and connect to the active session for a different user using this process you will get an Access Denied (7045 message or something similar) even if you are logged in as the â€œAdministratorâ€. You need to disconnect the session first.
a. As an example, there is a session that has been connected for a long time which I need to connect to (Session RDP-Tcp#2 Logon Time 7/02/2012).
4. Open a command prompt and type the following
a. tscon <ID> /password:* /v
i. For the above Example C:\>tscon 1 /password:* /v
b. Enter in the password for the User you have disconnected if necessary. If you are connecting to an Administrator Log on session and you are the logged in administrator you may omit the â€œ/password:*â€ parameter
5. You should now be connected to the session you are interested in, but remember the connection you initially made is still running but it is disconnected. You can connect to this session if you need to or just log the session off using the Terminal Services Manager.
Hope this helps someone in the future.