In a real development environment you may face the problem of multiple server connection “the terminal server has exceeded the maximum number of allowed connections”, which mean that many users actually have login, some of them are active and others may forgot to logoff before leaving the remote server, there are many solutions to this problem, you may login directly to the server if it was in-place and force disconnecting the inactive users, or use the below solution:
(We are going to create a batch file for wide of use for any server)
Open notepad and add the below lines:
Echo force opening remote site
@SET /P RemoteIP=Please Enter Remote Server IP address:
mstsc /v:%RemoteIP% /admin
Echo Remote Server IP IS: [ %RemoteIP% ]
Then click File > Save as…. and type the name of the file as “remote Server.bat “, don’t forget to choose from Save as Type in the opened dialogue “All files (*.*)” option.
Now you can see your batch, and you can open it and write down the server IP address, it will open the remote server console, and login using your user as normal, then open the remote server Task Manager, hit the “Users” tab, now you can see who is disconnected and occupy the server, now you can right click and force logging him of.