Query RDP connection

When using Remote Desktop to log into server machines if you have multiple users with access you will get the following error message when sessions are exceeded:
The terminal server has exceeded the maximum number of allowed connections.

A great solution, from your workstation via the command line.
C:\>query session /server:servername
SESSIONNAME USERNAME ID STATE TYPE DEVICE
services 0 Disc
console 1 Conn
rdp-tcp 65536 Listen

To reset a session, look for the relevant session ID in the “ID” column of the output from the above command, then use:
reset session /server:servername

In addition if you simply want to connect via the console, MSTC /v:hostname /admin will do the trick, use /? for a full list of commands.

Advertisements

About noneil
Rapper turned Rockstar!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: