Any ideas on how to do this or if it is possible at all would be appreciated.
3 Answers
If you can access the machine via SMB/RPC, then you should be able to install the administrative tools on your client machine. Then fire up the Remote Desktop (Terminal Services) manager. Point the console at the remote machine, and select the session to disconnect.

- 130,897
- 41
- 276
- 420
-
1The only other way than using the mmc tools (via RPC) would be to setup some sort of program to listen for connections and run commands locally on the TS server. From there, you can run wmi scripts or even use the built-in command-line tools. http://technet.microsoft.com/en-us/library/cc775998(WS.10).aspx for more info on the command line stuff. – TheCompWiz Aug 31 '11 at 18:50
-
In a non-domain environment, this usually produces 'access denied'. – Chris Thorpe Sep 04 '11 at 13:00
-
It work fine in non-domain envirinments. Just pre-authenticate to the server as an admin before starting the mmc. – Zoredache Sep 04 '11 at 20:56
I typically will RDP to the server using the console session, then logout people who are connected there. Take a look at mstsc's /console switch.
SOME RDP clients however, will try the console session automatically, hopefully that's not the case for you. Past that, you can look at the other answers posted to run a remote command to force a logoff.

- 8,753
- 1
- 24
- 35
Not a direct answert to your question. But when I have session that is not responding, I usally login as administrator using mstsc /admin
and then use Terminal Services Manager
to kill my inactive session in Windows Server.

- 176
- 1
- 10