Windows Server R2 Modify the number of Remote Desktop connections

Source: Internet
Author: User
Tags mstsc

Computer---Properties---remote settings---Check "Allow computers running any version of Remote Desktop to connect (less secure)" ...

  First step: Turn on Remote Desktop:

Computer---Properties---remote settings---Check "Allow computers running any version of Remote Desktop to connect (less secure)"

  Step Two: Set the maximum number of Remote Desktop connections

Control Panel--Manage Tools--Remote Desktop services--Remote Desktop Session Host settings--Remove the "restrict each user to only one session" tick, and then double-click the rdp-tcp---network adapter in the connection--the maximum number of connections is modified to 2 At this point, the number of simultaneous Remote Desktop connections is set to 2.

=================================================================================

In the work, often need to connect to the server remotely, however, in the company, the boss, colleagues need to connect to the server, and the default Win2003 operating system maximum number of connections is 2, so that the problem comes, often encountered "Terminal Server exceeded the maximum number of connections", resulting in the server can not be properly logged in. Here are a few ways to solve this problem by circulating on the Internet.

Workaround: Use "logout" to exit the remote desktop instead of closing the window directly;

Solution Two: Kick out the disconnected user;

1, first through a variety of methods connected to the server (Telnet);

2, go up, check the login user list. Input command: query user;

This way you can see what the difference is, depending on your specific situation. The user with ID 0 is logged on locally, and in state, when prompted for disconnection, the user is disconnected and consumes system resources and channels so that the user can be kicked off. Enter the logoff ID, which is the user who kicked the corresponding ID.

Workaround three: Limit the time that disconnected sessions exist; (recommended)

In general, when we maintain a remote server, it is not possible to be online for a long time, but the system defaults to no longer disconnect as long as it is logged in. Therefore, we can modify this default setting to give it an auto-disconnect time.

You can resolve the issue by setting it up in Group Policy on a Windows 2003 server: Click start → run, enter gpedit.msc, open the Group Policy window after carriage return, and then navigate to computer Configuration → administrative Templates →windows components → Terminal Services → sessions. Then, in the right-hand window, double-click Set time limit for disconnected sessions, set the end disconnected session time to 5 minutes in the window that opens, or disconnect when set to idle. Or, open the Run window on the remote server and enter the TSCC.msc Connection Settings window. Then double-click the "Rdp-tcp" to the right of the "connections" item, switch to the "Sessions" tab, select the "Override user Settings" option, and then set an appropriate time for "end disconnected session".

Workaround four: Increase the number of connections, that is, set the maximum number of connections more;

By default, the number of remote terminal connections allowed is 2 users, and we can increase the number of users who are connected to the remote connection as appropriate.

Click start → run, enter gpedit.msc to open the Group Policy Editor window, navigate to Computer Configuration → administrative Templates →windows components → Terminal Services, and double-click the limit number of connections on the right to set the maximum number of connections that TS allows.

Through the above two configurations (method three & Method four), basically can ensure that the remote terminal connection is no longer limited. However, it is still reflected that the current simultaneous only one user to connect, but prompted to exceed the maximum allowable number of links, what is the reason? This happens due to improper operation. When the previous account logged on to the Remote Desktop and exited without logging off, instead of shutting down the Remote Desktop window directly, the session was not released, but continued to remain on the server side, consuming the number of connections, which would affect the next user's normal login.

Workaround Five: Limit the number of user sessions;

Restrict Terminal Services so that a user can only connect once. For Windows Server 2003, in Terminal Services configuration (Terminal Services config), "Restrict per user to only one session" (Restrict One session) is set to Yes (yes). Additionally, you can set the Restrict Terminal Services users to use a single remote session Group Policy to Enabled.

Note: The version is not the same as the way to solve the difference!

A: This is because Windows 2003 sets the maximum allowed connections limit, and you may not log off each time you connect, but it shuts down directly, causing the number of connections to exceed the maximum number of connections. You can fix the problem by setting it up in Group Policy on a Windows 2003 server: Click start → run, enter gpedit.msc, open the Group Policy window after you enter, and then navigate to computer configuration → administrative templates → Terminal Services → sessions, and then in the right window, double-click Set the time limit for disconnected sessions to set the end disconnected session time to 5 minutes in an open window. The best solution is the way you log off each time you disconnect.

B: Often many people manage the server's friends must have encountered too much of their terminal connection to the remote computer when the "terminal connection exceeded the maximum connection" prompt it? This is because windows2003 only supports 2 end-user logins. When this happens, most people choose to call the computer room to restart the server. But the damage is obvious. So what can we do to fix it? Method of course there is. We only need to run "Tsmmc.msc" on a 2003 machine to open the Remote Desktop Connection, where we add a new connection, enter the other's IP address account number and password can be successfully landed on the other side of the desktop, then the next user can be kicked. You can solve the problem of exceeding the maximum number of terminal connections.

C: Start → control Panel → authorization To change the number of connections.

On the command line:
MSTSC/CONSOLE/V: Your server IP: remote port

Example: mstsc/console/v:222.222.215.222:3389

WIN2K/WIN2003 Terminal Server exceeds maximum allowable number of connections solution all the way
Cause: When you log on to a terminal server with a Remote Desktop link, you often encounter a "terminal server exceeding the maximum allowed links" error that causes the Terminal server to log on incorrectly, causing the problem because the default number of links for Terminal Services is 2 links, and if you log out of the Remote Desktop without logging out, Instead of shutting down the Remote Desktop window directly, the session is actually not released, but continues on the server side, which will take up the total number of links, and the above hint will appear when the number reaches the maximum allowable value.
How to avoid it?
First, use logoff to exit Remote Desktop instead of directly closing Windows two, limit the time that a disconnected session exists
1. Modify from Terminal Services Configuration
Run-tscc.msc (Terminal Services Configuration)-Connect-double-click Rdp-tcp or right-click-Properties-session-Select the first alternative user setting (O)-end a disconnected session [change the default value from never to an appropriate time, such as 30 minutes]
2. Modify from Group Policy
Start-run-gpedit.msc-Computer Configuration-Administrative Templates-windows components-Terminal Services-sessions
Right window select Set time limit for disconnected sessions-select enabled, select a time
Third, increase the maximum number of links
1, modify from Terminal Services Configuration: Run-tscc.msc (Terminal Services Configuration)-Connect-double-click Rdp-tcp or right-click-Properties, select "Network Card" tab-Modify "Maximum number of connections" To change the value you want, of course, this value can not be too large, otherwise it will occupy more system resources. However, the value modified here does not seem to work, and when set to No limit, the situation described in this article will still occur.
2, Group Policy level is higher than Terminal Services configuration, when Group Policy is enabled, the corresponding options in the Terminal Services configuration will be grayed and non-modifiable
Run-gpedit.msc-Computer Configuration-Administrative Templates-windows components-Terminal Services
Double-click Limit number of connections on the right-select enabled-fill in the maximum number of connections allowed
Four, change the remote terminal mode
Open Control Panel, double click Add Remove Programs, click Add Remove Windows Components, components, in the Windows Components Wizard dialog box, select Terminal Services, Next, Application Server, Next, and then follow the prompts to change the Terminal Services mode.
Windows 2000 Terminal Services has 2 modes of Operation: Remote Administration mode and Application Server mode. Remote Administration mode allows the system administrator to remotely administer the server and allow only 2 terminal sessions to log on to the Terminal server at the same time. Application Server mode allows users to run more than one application, allowing multiple users to log on from the terminal to access the server. However, the user who applies Terminal Services must have Terminal Services licensing, that is, the Terminal Services Licensing server must be set up within 90 days in this domain or workgroup, or the user will need to remove the application before reinstalling it.
V. Modifying the Local Security policy
Control Panel >> Administrative Tools >> Local Security policy >> Local Policies >> security options >>
1. Locate the >>microsoft network server first: The idle time required before the session is suspended
The default is: 15 minutes, instead of the time you need (that is, no action after landing after more than how much time after the automatic disconnection)
2. Then find >> Network security: Force logoff after logon hours are exceeded. The default is: Disabled, be sure to change to: Enabled
If a workaround has occurred:
1, first you can telnet to this host (regardless of which method you use), of course, if you can directly operate the machine better, but the direct operation does not have to use the command line, it is of course to know the machine Super Administrator's password, you can use Opentelnet to open the remote server telnet port.
2, Telnet up, first look at the user login:
Input command: Query user
System returns:
C:>query User
USERNAME sessionname ID State IDLE time LOGON time
K12update Console 1 in Operation 2007-3-14 14:57
It may be different at this point, depending on the situation.
ID 0 Users are logged in locally, ID 1 and ID 12 are 3389 logged in users, the former is running, the latter has been disconnected, but disconnected still occupy the system resources and channels, we have to kick it off. Proceed as follows.
Input command: Logoff 1
3, if the server shuts down the Telnet function (this is the default), you can also use SQL Server xp_cmdshell extended stored procedures, using the format: Master.dbo.xp_cmdshell ' command content ', the rest can refer to the second step. Permission to access xp_cmdshell is required in this way
The above approach is basically useless.

[Original classic] "Terminal Server exceeded the maximum number of allowed connections" solution

2007-04-25 17:13

Phenomenon and cause: When you log on to a terminal server with a Remote Desktop connection, you often experience "Terminal Server exceeds maximum allowed connections" and so on, which causes the problem to fail to log on to the Terminal server because the default number of connections for Terminal Services is set to 2 links in Windows Server 2003. And when you log on to the Remote Desktop if you do not exit with logout, but instead directly shut down the Remote Desktop window, then the actual session is not released, but continue to remain on the server side, so that the total number of links, when the number reached the maximum allowable value of the above prompt.
Solution:
Method One: Use "logout" to exit the remote desktop instead of closing the window directly
Law two: Kick out a disconnected user
1, first telnet to this host (no matter what method you use), of course, if you can directly operate the machine better, but direct operation will not have to use command line, with the console more intuitive (skip).
2, Telnet up, first look at the user login:
Input command: Query user system returns:
User name username session name sessions, name ID status, state idle time, logon hours, logon time
Administrator Console 0 is in operation. 2007-1-12 10:24
Lucy 1 record No 2007-1-12 10:35
>administrator rdp-tcp#35 2 is disconnected. 2007-1-25 18:09
At this point it may be different from mine, depending on your specific situation.
The user of ID 0 is logged on locally
ID 1 and ID 2 are 3389 logged users, the former in operation, the latter has been disconnected, but disconnected still occupy the system resources and channels, we have to kick it off, such as under the operation.
Input command: Logoff 1
Look again.
C:\Documents and Settings\administrator.ad>query User
User name username session name sessions, name ID status, state idle time, logon hours, logon time
Administrator Console 0 is in operation. 2007-1-12 10:24
>administrator rdp-tcp#35 2 is disconnected. 2007-1-25 18:09
3, if the server shuts down the Telnet function (this is the default), but also through SQL Server xp_cmdshell extended stored procedures, using the format: Master.dbo.xp_cmdshell "" Command content ", the rest can refer to the second step. This method requires permission to access xp_cmdshell.
Law III (Best Practices-recommended): Limit the time that a disconnected session exists
In general, when we maintain a remote server, it is not possible to be online for a long time, but the system defaults to no longer disconnect as long as it is logged in. Therefore, we can modify this default setting to give it an auto-disconnect time.
You can resolve the issue by setting it up in Group Policy on a Windows 2003 server: Click start → run, enter gpedit.msc, open the Group Policy window after carriage return, and then navigate to computer Configuration → administrative Templates →windows components → Terminal Services → sessions. Then, in the right-hand window, double-click Set time limit for disconnected sessions, set the end disconnected session time to 5 minutes in the window that opens, or disconnect when set to idle.
Or
Open the Run window on the remote server and enter the TSCC.msc Connection Settings window. Then double-click the "Rdp-tcp" to the right of the "connections" item, switch to the "Sessions" tab, select the "Override user Settings" option, and then set an appropriate time for "end disconnected session".
Law IV: Increase the number of connections, that is, set the number of connections can be more
By default, the number of remote terminal connections allowed is 2 users, and we can increase the number of users who are connected to the remote connection as appropriate.
Click start → run, enter gpedit.msc to open the Group Policy Editor window, navigate to Computer Configuration → administrative Templates →windows components → Terminal Services, and double-click the limit number of connections on the right to set the maximum number of connections that TS allows.
With the above two configurations (Law III & IV), it is basically possible to ensure that remote terminals are no longer restricted when connected. However, it is still reflected that the current simultaneous only one user to connect, but prompted to exceed the maximum allowable number of links, what is the reason? This happens due to improper operation. When the previous account logged on to the Remote Desktop and exited without logging off, instead of shutting down the Remote Desktop window directly, the session was not released, but continued to remain on the server side, consuming the number of connections, which would affect the next user's normal login.
Method Five: Limit the number of user sessions
Restrict Terminal Services so that a user can only connect once
For Windows Server 2003, in Terminal Services configuration (Terminal Services config), "Restrict per user to only one session" (Restrict One session) is set to Yes (yes). Additionally, you can set the Restrict Terminal Services users to use a single remote session Group Policy to Enabled.

Windows Server R2 Modify the number of Remote Desktop connections

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.