Jun
4

Controlling Windows Server Remote Session

Author andy18    Category Windows-related     Tags

What do you do when you are trying to login to the server via RDP and you are being prompted that the session is full? For me, is kinda of frustrated as I will need to login via another server, open up the Terminal Service Manager to connect to the server to check on which session is left connected without proper log-off.

Well, Windows 2003 server comes with a handy command which allow you to connect as a third session to the server. The third session will be the console session. Here’s the command you may execute from another server and make the connection as a console session:

mstsc /v:servername /console

To check on the remote session via command line, you may use the qwinsta and rwinsta. qwinsta stands for Query WINdows STAtion while rwinsta is Reset WINdows STAtion

To query a remote session:

qwinsta /server:

Example :
qwinsta /server:win2k3

SESSIONNAME USERNAME ID STATE TYPE DEVICE
console 0 Conn wdcon
rdp-tcp 65536 Listen rdpwd
rdp-tcp#2 andy 1 Active rdpwd

To reset a remote session after you have gather the session info, we will use the rwinsta.

rwinsta /server:

As per the example above, we will reset the session owned by “andy” with ID 1.

rwinsta /server:win2k3 1

Post comment