Main Topics
Browse All Topics
can someone write down here a command line that can close terminal services session?
sometimes I try to RDP to a machine and it says something about the maximum connection reached.
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Just to add on further to here, usually the "Server has reached its maximum number of connection" error occurs due to the fact that the server is set to accept the default number of concurrent connections, which is 2 RDP & 1 Console switch.
Try using the console switch "mstsc servername /console" and check if your able to log in. If still cannot then, you may try marine7275: to log off any users remotely from another server. However, you will need to find out which sessions are active or disconnected before that, use below to check it:
QUERY USER /server"servername_or_ip
This should return the list of users logged onto the server at that point in time, check for the "ID" and the "State" column and jot down the ID for only disconnected users, if there are any.
Then to log off the session user the "reset session sessionid /server:theserver_or_ip" this should free up one connection for yourself. Hope this helps.
Br,
Adam
Ooops just noticed that the command is with the : not " that is why you get the incorrect operator error.
QUERY USER /server:servername_or_ip
And then do the rest of the troubleshooting i.e.:
Check for the "ID" and the "State" column and jot down the ID for only disconnected users, if there are any. Then to log off the session user by:
RESET SESSION sessionid /server:server_or_ip"
This should free up one connection for yourself. Let us know how to get on.
Business Accounts
Answer for Membership
by: leewPosted on 2009-04-30 at 11:33:59ID: 24273011
Install the Adminpak.msi on your computer and then use the Terminal Services Manager MMC to connect to the remote system and close the idle/disconnected sessions. (I know of no command line that will do it),.