Remote Desktop

1. With Windows 2003 you can now connect to the console session of a server meaning you actually have 3 connections available when running in "Remote Administration" mode. This was not possible with Windows 2000.

2. You can always connect to the console session even if you get the following message on the standard sessions: "The terminal server has exceeded the maximum number of allowed connections."

3. To be able to connect to the console session you need a Remote Desktop client using the RDP protocol 5.1 or higher. The one with Windows XP is 5.1 and works fine. The one from Windows 2000 does not work. It does not support a console option. A new client for 2003 exists as well that use RDP 5.2 (it has a re-connect option if the connection is dropped and some other stuff): http://www.microsoft.com/downloads/details.aspx?FamilyID=a8255ffc-4b4a-40e7-a706-cde7e9b57e79&DisplayLang=en It can be installed on Windows 95 and up (though you won't get the support for mapping local drives etc.)

4. To connect to the console session you start the client from a command prompt (or create a shortcut) or directly under Start Menu -> Run with the following command: mstsc /console You then select server name etc. as usual when the client starts. Note that mstsc on Windows XP is located in: "%Windows%\System32\mstsc" And the 5.2 download installs in: "%ProgramFiles%\Remote Desktop\mstsc" If you don't add the 5.2 to the "PATH" statement the one in system32 will be run by default (it does not upgrade the Win XP client).

5. Other options exist to connect to the console session.

5. A. The "Remote Desktop Management Console" (MMC) snap-in. This has a checkbox for console session which is on by default. 5. B. You have the Remote Desktop Web Connection as well that you can install (a web based client): Control Panel -> Add or Remove Programs. Click Add/Remove Windows Components. Click Internet Information Services, then click Details. Under Internet Information Services, click World Wide Web Service, then click Details. Select the Remote Desktop Web Connection check box. Click OK and finish the wizard. This can be installed on the machine you want to connect to or any other Windows 2003 server. It uses an ActiveX control that you download to your browser. Note that if you have removed the "Default Site" under IIS you need to create your own virtual dir to C:\windows\web\tsweb\ on the site of your choice. If you still have the "Default Site" the virtual dir will be created for you. The sample default.htm page doesn't support the option to logon to the console session by default. So in the default.htm you need to add the following:

5. B.1. Above the code for the checkbox that already exist add:



5. B.2. Under the sub called "BtnConnect" add: if Document.all.CheckBoxConsole.checked then MsRdpClient.AdvancedSettings2.ConnectToServerConsole = TRUE end if

6. Connecting to the console session is useful for other things than when you get the "The terminal server has exceeded the maximum number of allowed connections." message. For example I'm running a game server where the server software runs in a command window. Normally I would create a service of this to get around the issue with ending up in the wrong session etc as you could do in Windows 2000. But it's an old game and when creating a service out of the .exe I wouldn't get any status info from the server. With Windows 2003 I can have them running in the console session. No need to use a third party tool like Radmin, VNC etc. to accomplish this.

7. Be warned that if you do not connect to the console session with the same account as the one currently logged in, all open files in the console session will be lost. You get a big warning message about this though if you try and log in with another account. If you log in with the same account you directly take control over the console session and any other person connected on the console session gets disconnected. All files/apps will still be running.

8. Once logged on to the console (or any other session) you can right click on the taskbar and select "Task Manager". When in a session you get a tab here called "Users". You can now choose to log off or disconnect the other sessions that might have become orphan or are still being open on a computer at work or something. You could connect to those sessions as well to see if any files are open in them first or even remote control them to interact with them.

9. You will notice in the terminal service manager that the console session always have sessionid = 0. You still see both a remote connection with sessionid = 0 and a "console" object as well. The "console object" will always be there as well but to identify which session is connected to it look for the one with sessionid = 0.

10. Other cool stuff is that you can remote control other sessions on the computer to interact with them (right click on them -> Remote Control). In other words the "connect" option takes the session directly, while the "Remote Control" option will interact with the session, two at the same time. By default the current user of the session gets a message telling him/her that another connection is incoming for Remote Control. You can select Yes or No to this. If you are the only one using the server then you can disable this message under policies but on the other hand you could just "connect" instead of remote control the sessions in that case.

11. Note that if you have set a timeout limit on sessions to disconnect or remove them this might apply to the console session as well. I haven't verified this yet. In other words if you will be running cmd windows or other apps don't set a time limit. Leave it at default which is umlimited.

12. This concept of console session is different compared to the remote desktop service built-in in Windows XP. In Windows XP you only have one session which is the console session and that's the one you always connect to. With Windows 2003 in Remote Administration mode you have the console session and two other "standard" sessions as in Windows 2000 Server, where the console never is the default one unless you use one of the methods mentioned above.

@man!

Phasellus facilisis convallis metus, ut imperdiet augue auctor nec. Duis at velit id augue lobortis porta. Sed varius, enim accumsan aliquam tincidunt, tortor urna vulputate quam, eget finibus urna est in augue.

1 comment:

Unknown said...

use mstsc /admin if you installed XP sp3.