Back to the ICT-Hotlist...
Don't miss latest updates Follow @WebHalla
How to stop a RDP session so you can log on to remote desktop again.The Remote Desktop Protocol (RDP) is a robust technology of Microsoft to take over and manage remote servers and PC's/Notebooks. RDP shows the user a graphical console of the other computer and allows the sending of key strokes and mouse movements to the same computer and even receive sound. Most servers allow up to 2 RDP sessions for system management, otherwise Client Access Licenses (TS-CAL's/RDP-CAL's) should be acquired and user(groups) must be added to the remote users group by "Select users who can use remote desktop"(Windows desktops), by Group policies or by the terminal server manager.
Adding Remote Desktop Users on a Windows 10 desktop
RDP is refused.When you are locked out of an RDP connection with the error : "The terminal server has exceeded the maximum number of allowed connections", there are probably 2 sessions not correctly logged off and are still active. There are two strategies without rebooting the server.
RDP to the server console to stop a sessionBy using the following command line code you start a Console session.
mstsc /adminNext you have to enter an IP-address or server name in the dialog. Than start Task Manager, select the tab "Users" and stop the sessions. Now you should able to logon with RDP.
Locate the server sessions and stop these.First get the session ID's of the running Remote Desktop protocol sessions by using the command:
query session /server:<server name or IP-address>
C:\>query session /server:nlaaldc1 SESSIONNAME USERNAME ID STATE TYPE DEVICE console 0 Conn wdcon rdp-tcp 65536 Listen rdpwd rdp-tcp#79 administrator 2 Active rdpwd rdp-tcp#73 administrator 1 Active rdpwd
reset session <session-id> /server:<server name or IP-address>
reset session 2 /server:nlaaldc1Now you should able to logon with RDP.
System requirementsWindows 2003 server, Windows 2003 R2 server, Windows 2008 server, Windows 2008 R2 server, Windows 2012 server, Windows 2012 R2 server, Windows 10, 8.x, 7
Standardize on RDPOn several Linux systems xrdp can be installed. This allow taking over a Linux console with Windows Remote Desktop tools. You receive a Linux X window to manage the machine.
You may vote your opinion about this article:
Scripts and programming examples disclaimerUnless stated otherwise, the script sources and programming examples provided are copyrighted freeware. You may modify them, as long as a reference to the original code and hyperlink to the source page is included in the modified code and documentation. However, it is not allowed to publish (copies of) scripts and programming examples on your own site, blog, vlog, or distribute them on paper or any other medium, without prior written consent.
Many of the techniques used in these scripts, including but not limited to modifying the registry or system files and settings, impose a risk of rendering the Operating System inoperable and loss of data. Make sure you have verified full backups and the associated restore software available before running any script or programming example. Use these scripts and programming examples entirely at your own risk. All liability claims against the author in relation to material or non-material losses caused by the use, misuse or non-use of the information provided, or the use of incorrect or incomplete information, are excluded. All content is subject to change and provided without obligation.