February 25, 2005
Some of my coworkers have an annoying habit of remoting into our Win2k servers and never logging out. They also like to do this in pairs, which means nobody else can remote into the machines due to Microsoft's default two-user administrative mode Terminal Services limit. Yeah, I could rclient in, or use remote MMC snap-ins, but sometimes it's just faster to manipulate the GUI via Remote Desktop.
There's a tool to remotely manage remote desktop connections in Win2k, but I couldn't find any equivalent in XP. A little searching turned up Microsoft's Windows Server 2003 Administration Tools Pack which provides server management tools that allow administrators to remotely manage Windows 2000 Servers & Windows Server 2003 family servers. And indeed it does! The kit installs the following tools, which appear under the Start, Programs, Administrative Tools menu:
- Active Directory Domains and Trusts
- Active Directory Management
- Active Directory Sites and Services
- Active Directory Users and Computers
- Authorization Manager
- Cluster Administrator
- Connection Manager Administration Kit
- Distributed File System
- IP Address Management
- Network Load Balancing Manager
- Public Key Management
- Remote Desktops
- Remote Storage
- Terminal Server Licensing
- Terminal Services Manager
- UDDI Services
All this for the low, low price of nothing. The only part I care about is the Terminal Services Manager, which lets me terminate idle remote desktop sessions from target servers. Take that coworkers!
Posted by Jeff Atwood
You could also fire up the ts client using "mstsc /console" and kick them off that way. ;)
You could disconnect them from a command prompt with tsdiscon:
tsdiscon 1 /server:fabrikam
Or reset their session with rwinsta:
rwinsta 1 /server:fabrikam
If you wanted to be picky/choosy about Who you disconnect/reset, you can view session info with qwinsta:
A couple other command line tools are tsshutdn (shutdown/reboot machine) and tskill (kill process).
I believe these are all available on Windows XP by default.
Running Terminal Services Manager from my home machine wouldn't connect to the remote machine. the rwinsta command doesn't have any facility for entering credentials.
My remote server is hosted by 1and1.
Thank you very much! These commands are VERY useful.
After reading this article looking for a Remote Connection Manager and realizing that the old MS mmc kinda stunk I built a connection manager using .net 2. I hope it can be of use.
you could also logoff a remote TS user:
in cmd do:
logoff sessionID /server:servername
Or you can do the following:
query session /server:servername
find the inactive user and then:
logoff usernumber /server:servername
Every command from above in a command prompt and they did not work for booting a user from the server I entered. I am using Windows XP machine to do it with Domain Admin privileges. Any know why it's not working for me?