Terminal Services / RDP session timeout
We have around 600 Windows 2003 servers that are administered by 4 different departments and 72 IT staff.We used to have a problem that people leave their RDP sessions open indefinitely, preventing other people from accessing the server when 2 sessions are in use.We fixed this by setting a Group Policy config in Computer | Admin templates | Windows Components | Terminal Services | Sessions | Set time limit for disconnected sessions -> 3 hoursThis works, and for sessions that need to be left for longer, we allow people to connect with mstsc /console which does not get timed out with these configurations.We have deployed Server 2008 x64 for Exchange 2007 SP1, and we find the following problems;mstsc /console does not connect to the consoleSessions are timed out after 3 hours of inactivityDoes anyone know of a way to do what we do in 2003 for the 2008 servers?
February 13th, 2009 4:18am
Hi,
According to your description, I understand that you have two questions:
1. The client computer do not apply the policy that you have configured.
2. You cannot use mstsc /console connect to Windows Server 2008.
Question1:
To narrow down this issue, Id like to confirm the following:
1. Does this issue occur on all the computers? Try to logon another computer, does it work?
2. Logon the problematic computer, and run gpresult /z >c: gp.txt
(Please send us the log to tfwst@microsoft.com.)
In addition, you may check the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\TerminalServices
On the right hand side you will see the MaxDisconnectionTime Dword (if the policy is already set). We can change the value for this MaxDisconnectionTime as follows:
For one minute, set it to 60000
For three hours, set this to 10800000
Question2:
As far as I know, In Windows Server 2003, you can start the RDC client (Mstsc.exe) by using the /console switch to remotely connect to the physical console session on the server (also known as session 0). In Windows Server 2008, the /console switch has been deprecated. You may use the /admin switch to connect to Windows Server 2008.
For more information, please refer to this article
http://support.microsoft.com/kb/947723/en-us
Regards,
Nick Gu - MSFT
Free Windows Admin Tool Kit Click here and download it now
February 16th, 2009 1:15pm
You must have misunderstood my original posting - or maybe I am asking the wrong question;I said:We fixed this by setting a Group Policy config ... This works,So for your question 1 - the answer is no, the computers get the Group Policy applied and it works. GP Result shows that we get the GPO applied and the settings in the registry key that you pointed me to are exactly as specified in the GPO - on both 2008 and 2003 servers. We have no problems with the setting being applied to Windows 2003 servers.And for your second question, the answer is also no. Look very carefully at the link that you sent me about RDC 6.1, as it specifies;to connect from a Windows Vista SP1-based client to the physical console session of a Windows Server 2003-based server, run the mstsc.exe /admin command.So the /admin switch is a change to the RDC client, and not specifically for connecting to 2008 server.Then later in the article;Windows Server 2008 session 0 is a noninteractive session that is reserved for services. Therefore, there is no need for you to explicitly connect to this sessionSo, the article that you have sent me answers the question that I cannot use RDC to connect to the console / session 0 in order to bypass terminal services timeouts. Thanks for that, it has helped. But, that raises a new question.So my new question is;How do I temporarily bypass Terminal Services restrictions that are in place through Group Policy so that I can leave a session running on a server without it being timed out as "idle" when it is an application doing a process that needs to run as an interactive session (in our case; monitoring systems, Exchange 2007 mailbox moves happening in the middle of the night, legacy applications that can't run as a service etc.)
February 17th, 2009 2:50am
Hi,
Thank you for your update.
From your description, I understand that you want to leave the session always running on a server without being timed out as idle. If there is any misunderstand, please let me know.
Based on my research, you may refer to the following steps to achieve your goal:
Using Terminal Services Configuration
1.Open Terminal Services Configuration.
2.In the console tree, click Connections.
3.In the details pane, right-click the connection for which you want to modify time-out settings, and then click Properties.
4.On the Sessions tab, above End a disconnected session, select the Override user settings check box. This allows you to configure time-out settings for the connection.
5.Configure the following time-out settings as appropriate:
In Idle session limit, select the maximum amount of time that an idle session (a session without client activity) remains on the server. When the time limit is reached, either the user is disconnected from the session or the session ends. When a session ends, it is permanently deleted from the server. Select Never to allow idle sessions to remain on the server indefinitely.
For more information, you may read the following link:
http://technet.microsoft.com/en-us/library/cc758177.aspx
Regards.Nick Gu - MSFT
Free Windows Admin Tool Kit Click here and download it now
February 18th, 2009 6:58am
Thanks, as always, for great help.Thanks for the article - it is exactly what we wanted and what we followed when we were doing this on Windows 2003.The information that you have provided has been great for Windows 2008, but unfortunately as we have already specified those settings in Group Policy, the configuration is already applied and greyed out.It appears that due to the decision from Microsoft to remove the ability to run applications in the "Console" or "Session 0", that we cannot perform the following;
Scheduled mailbox moves with Exchange 2007 (as the dialog box needs to stay open to move the mailbox overnight or over the weekend for example)
Legacy applications with a GUI that needs to run all the time to run and cannot run as a service (as they need to be interactive)
Applications that get started through a GUI interface, like many of our UNIX (Windows SFU) applications that have been migrated onto Windows.
Any other long-running application that runs as a GUI and not as a service - like a disk defragmentation, performing a search/reindex, or other scheduled runs etc.
So, we will have to do one of the following;
Stay on 2003
Create a new GPO without the settings to timeout idle sessions for systems where we need to have idle sessions.
February 20th, 2009 9:04am
If you want to log in to the console(session 0), I think you may use VNC to get around this.
Free Windows Admin Tool Kit Click here and download it now
February 24th, 2009 6:14am
Hi,
Is there a way to check to see what the Terminal Services session timeout is currently set to? I checked the following registry and it was set to a minute:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
MaxDisconnectionTime Dword (60000)
I don't think that is correct, since I'm currently connecting to another server via Remote Destop, and I'm installing an application. I know I've kept it idle for more than
a minute. My problem is that I've already started to install an application, and I'd like to leave it installing but I'm afraid my session will timeout. Is there anything I can do to increase the session timeout while my application is running.
I did follow your instructions to change the timeout session, but it notified my me it wouldn't be effective with the current application.
March 7th, 2011 7:49pm


