Please Note: This entry is an archived entry from my previous weblog. No new comments may be posted. Also, as of May 2005, I have left Microsoft. I am still happy to respond to any questions or comments about this article, but as I am no longer on the Visual Studio team, I may not be able to provide any helpful answers.
Ever wanted to connect to the console session of a Win2k3 box via RDP? With XP, this is the default behavior, because only one interactive user can be logged in at a time. But 2k3 allows multiple ineractive users (and even the same user multiple times), so connecting via RDP and logging in as the console user just creates a new session and leaves the console alone.
Here's a trick to let you remotely connect to the console session:
Presto! When you launch the foo.rdp file and login to the remote system, you'll connect to the console session. Have fun.
[Update] John provides this information in the comments: "'mstsc /v:machine-name /console' I think it picks up the other settings from Default.rdp."
< Geekness > Posted at May 20, 2003 01:46 PMThanks for sharing. This rocks! I don't know how many times I was - unsuccessfully - looking for behavior like this.
-Ingo
Comment by: Ingo Rammer at May 21, 2003 01:53 PMmstsc /v:machine-name /console
I think it picks up the other settings from Default.rdp.
Comment by: John Lambert at May 21, 2003 10:01 PMVery cool. I just found the "connect to console" option by running Strings over mstsc.exe. Command line switches are also convenient.
Comment by: Joe Bork at May 21, 2003 10:49 PMI reccomend just modifying the shortcut in "Accessories->Communications" to point to mstsc /console. Unless of course you want terminal server functionality. This is what I do, and dont even have to think about connecting to console anymore as thats all I connect to.
Comment by: J.P. at May 23, 2003 10:09 PMIf you're running rdp client 5.2 [including with w2k3] you can just click on a Connect to Console button from the GUI. Alternatively, in the host area just append /console ot the hostname or IP address.
Unfortunately, this feature only works against w2k3 terminal servers - so trying to connect to console on w2k won't work, even with the newer client.
It's semi-neat, but compared to the new TS licensing with w2k3 I can't say I'm super happy. One other -nice- thing is that Terminal Servers no longer need to be DC's in w2k3 - but again, they're just pulling their standard M$ bullshit of putting in features which should have been there to begin with, but now charging folks more - how nice of them.
Comment by: grey at May 26, 2003 09:39 AManyone know how to do a /console connection from rdesktop?
Comment by: carmen at October 9, 2003 11:56 PMYou can also connect from a client running W2K. I've tested both the mstsc /v:... method as well as adding the 'connect to console' in a .rdp file. Just make sure you have the latest RDP client from the Downloads section of www.microsoft.com/windowsxp
From Rdesktop, where you would have specified the
server name, like:
myserver
make the name of the server be:
myserver /console
(right there in the box for Computer: )
Comment by: Foo at December 10, 2003 01:32 PMYou can look at my little app: Royal TS http://code4ward.net/c4w/posts/234.aspx
It's free and supports connection to the console (XP and W2K3). And, of course, written in C#.
Comment by: Stefan Koell at March 22, 2004 12:09 AMNeither adding the "connect to console" line to the .rdp file or adding /console to the server name in the GUI works for me (XP Pro sp1) but the /console command-line option works fine. I only have the stock version of the client; I suppose it would work if I updated it.
In any case, thanks a lot for the tip. I've been looking for this information for weeks... Now I don't have to remember closing Outlook and Visual Studio when I leave work if I want to do a bit of work from home that day :).
If you want to connect to multiple terminal servers and move between them freely, you can use the MMC snap-in which can be downloaded in the Windows 2003 Admin Pak
However, once you open the MMC snap-in and connect to a session, you do not have keyboard controls and I can't see any options for that either. Can anybody help me solve this problem or knows any 3rd party utilities which make connecting to multiple sessions more convenient?
Comment by: Bill at September 7, 2004 12:34 PMThere exists a KB article about this, ID 278845
How to Connect to and Shadow the Console Session with Windows Server 2003 Terminal Services
http://support.microsoft.com/default.aspx?scid=kb;en-us;278845
You can create a shortcut to mstsc.exe and /console to the target field. That way you get the settings you want, the GUI for Remote Desktop Client, and you never have to type anything. The /console switch will always load up with the client.
Example:
DRIVE:\PATH\TO\FILE\mstsc.exe /console
Below is a small vbs script that I use to Console to some of my servers. It prompts for a server name or IP. Type in the server name or IP and it connects to the console session @ 800x600. I got sick of dicking around with command lines.
Chad
dim srvrname
srvname=inputbox("Enter A Terminal Server Name to Console To.")
if srvname="" then
msgbox("You did not enter a name")
else
set wshshell = wscript.createobject("wscript.shell")
wshShell.run "mstsc /v " & srvname & " /w:800 /h:600 /console"
end if
Grey, I don't see connecto to console anywhere in my gui. I am running RDP 5.2.3790. Where do you see this gui option? email me at jcook@ccs5000.com
Comment by: Jeremiah Cook at November 4, 2004 07:02 AMThanks for all tips!
Anyone who knows how to see which (in the event viewer) user who logs on to the specific server.
We have a bunch of users who uses the same username when logging on but i want to see the username behind the Terminal Server User.
They are all in the same Windows Domain.
Is the rdp file format published somewhere? I'd like to be able to write them myself but, for instance, I don't know what format the password entry is stored in.
Thanks,
tj