Help - Search - Members - Calendar
Full Version: Remote Desktop / Terminal Services Tip - Console session
The Planet Forums > Operating Systems > Microsoft Windows
Argyle
Some stuff I've been testing/learning today.

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...&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%System32mstsc"

And the 5.2 download installs in:
"%ProgramFiles%Remote Desktopmstsc"

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).

Note:
Do not enable FIPS encryption on server level unless you are sure the servermatrix staff is using the latest client with RDP 5.2, or you might void your SLA if they can't connect.

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:windowswebtsweb 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:

<p class=topspace>&nbsp;<input type="checkbox" name="CheckBoxConsole" ID=CheckC value="OFF"><label for="CheckC" ID=ConnectToConsole accesskey="c"><ID id=consoleinfo><u>C</u>onnect to console session&nbsp;</ID></label><br>

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). I don't remember if that was possible in Windows 2000. 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.

13.
This might be common knowledge to most people but I posted it anyway. I find the /console option to be a great addition to Windows 2003 so I though I would post what I found out when testing it today :)

/Argyle
seventech
All useful stuff to know, mind if I publish it on one of my sites? Http://info-x.co.uk. Full credit to you ofcourse.
Argyle
No problem. Publish wherever you want :)
nesNYC
Thanks! icon_lol.gif
X-TremeGaming
Sticky this mods?
klaude
Stickied!

So this is taking over the local console like VNC then?
Argyle
Yes. From the Microsoft docs:

"There are several new server features that provide improved management of Terminal Services and the Windows Server 2003 family.

In addition to the two virtual sessions that are available in Windows 2000 Terminal Services remote administration mode, an administrator can also remotely connect to the real console of a server., Tools that would not work in a virtual session before, because they kept interacting with ‘session 0’, will now work remotely.

To connect to the console, administrators can choose one of the following methods:
• Use the Remote Desktop Microsoft Management Console (MMC) snap-in.
• Run the Remote Desktop Connection (mstsc.exe) program with the /console switch.
• Create Remote Desktop Web Connection pages that set the ConnectToServerConsole property. "
SHS`
QUOTE (Argyle)
<snip>

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...&DisplayLang=en  

<snip>

Note:
Do not enable FIPS encryption on server level unless you are sure the servermatrix staff is using the latest client with RDP 5.2, or you might void your SLA if they can't connect.

<snip>


I have no problem with FIPS enabled and logging in via the default Win2k3 client (I personally run it as a desktop OS as well), but unfortunately one of the other people would would admin the server with me uses Win2k... and even with the update client... get an error reporting that their client doesn't support FIPS... which seems rather daft.

5 hours of Google and mailing list searches later I'm no wiser as to why this is... I'm sure I've used the 5.2.x client win Win98 and WinXP to connect to Win2k3 server with FIPS enabled without issue...

If someone can shed some light on this, I'd be very grateful. icon_biggrin.gif
Argyle
Are you sure he is starting the latest client? It installs in "Program FilesRemote Desktop" and it's not added to any PATH statment. FIPS is handled in the remote desktop client (if it uses RDP 5.2) and should not be dependent on the operating system level.
SHS`
QUOTE (Argyle)
Are you sure he is starting the latest client? It installs in "Program FilesRemote Desktop" and it's not added to any PATH statment. FIPS is handled in the remote desktop client (if it uses RDP 5.2) and should not be dependent on the operating system level.


Yes, that's what I thought too... the fact it installs itself to a different path and thus the older version might be invoked... but I was told it was quite definately a post Win2k version as the UI when one launches it looks different.

I know it should be OS independant as I've used it on Win98 and WinXP connecting to FIPS required servers without issue.

Guess will just have to have another dig tomorrow. icon_biggrin.gif
unidrin
argyle are you the one from ssihosting.com
?
Matt2k
yes
i mean no
probably
nForcer
Over a year and a month old
and thier first post.

Could have just sent them a Private message.
Its more than likely they're not even around anymore.
unidrin
lol
cprompt
QUOTE (unidrin)
lol

Nice one, you just doubled your post count icon_mrgreen.gif
demsang
QUOTE
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."  


How do you fix this?
demsang
Nobody read sticky threads anymore? Can anybody help me how to connect when it says maximum connections already... I do not want to reboot.
JustGags
QUOTE (demsang)
Nobody read sticky threads anymore? Can anybody help me how to connect when it says maximum connections already... I do not want to reboot.


Wait a bit and the connections will clear out. Or, at least, that works for me.
demsang
I've been waiting for the past 2 weeks.
nForcer
you try connecting as console?

mstsc /console

log in as your admin
THAT should let you in regardless of the logged in users.

Worse case scenerio, reboot the server but you could always send in a ticket to have them physically plug into your machine, and log out one of the users (not exactly safe but will save you a reboot)
klaude
At times Windows won't recognise a new keyboard and mouse plugged into the system. It requires a reboot to be able to use the local consile in these cases. Watch out for that if you request a local login from support.
nForcer
Even for USB input devices? icon_confused.gif

PS2, I'm aware, but USB shouldn't.
demsang
QUOTE (nForcer)
you try connecting as console?

mstsc /console

log in as your admin
THAT should let you in regardless of the logged in users.

Worse case scenerio, reboot the server but you could always send in a ticket to have them physically plug into your machine, and log out one of the users (not exactly safe but will save you a reboot)


Thank you so much! You've saved me. Tell me, what can I do to repay you?

icon_wink.gif
Matt2k
I have experienced that doing this on one of my Celeron 2.4 machines that it causes a STOP error to be generated and the server rebooted (Tried it three times). Microsoft online crash analysis claims that it's a known bug in the Intel video driver. Anyone else seeing this?
renis
This seems very old, but anyway i receive the same error, and found the same information after sending report to microsoft

mstsc /concole crashes the system
nForcer
Microsoft just released an update to the Remote Desktop/Terminal Services application.

Make sure you've ran Windows Update (or Microsoft Update) and have selected that upgrade. It should be under non-critical updates, but it adds a LOT of new features.
ChuFuong
LOL... I can't believe people didn't know about this. It's been around since like Win 3.1 or something.
NashG
Really good stuff.Thanks for the information.
New Jobs
sugumar
QUOTE (Argyle @ Nov 15 2003, 03:12 PM) *
Some stuff I've been testing/learning today.

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...;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%System32mstsc"

And the 5.2 download installs in:
"%ProgramFiles%Remote Desktopmstsc"

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).

Note:
Do not enable FIPS encryption on server level unless you are sure the servermatrix staff is using the latest client with RDP 5.2, or you might void your SLA if they can't connect.

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:windowswebtsweb 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:

<p class=topspace>&nbsp;<input type="checkbox" name="CheckBoxConsole" ID=CheckC value="OFF"><label for="CheckC" ID=ConnectToConsole accesskey="c"><ID id=consoleinfo><u>C</u>onnect to console session&nbsp;</ID></label><br>

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). I don't remember if that was possible in Windows 2000. 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.

13.
This might be common knowledge to most people but I posted it anyway. I find the /console option to be a great addition to Windows 2003 so I though I would post what I found out when testing it today icon_smile.gif

/Argyle



is there any posibilities to have two mstsc /console in windows 2003 server ?
Ryan Bennett
QUOTE (sugumar @ Apr 10 2009, 12:21 AM) *
is there any posibilities to have two mstsc /console in windows 2003 server ?


No, you can only have 1 "/console" session through remote desktop.
ajz4221
QUOTE (Ryan Bennett @ Apr 10 2009, 10:13 AM) *
No, you can only have 1 "/console" session through remote desktop.


Session 0 is the console so only one session 0 can exist.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.