Managing Terminal Services Sessions Remotely
Sometimes there are already sessions on remote server which made you unable to TS to server. There is a way to remove inactive session and enable you to TS.
command:
qwinsta /server:****
Where **** is the IP address or name of the non-accessible machine.
This will display something like this:
> qwinsta /server:****
To disconnect session I would type this:
rwinsta /server:**** 3
Notice the 3 which is the session ID