RDP setup

I often need to connect to servers via RDP. I’ve found these posts below helpful for configuring RDP connection settings, specifically getting the new RDP window to open on the screen I want in the position I want.

Firstly, GrandPixel’s comment on this blog post at hydrous.net at 9:00pm on August 17, 2010.

Secondly, this post at blogs.msdn.com

The final RDP file contents for me are:

screen mode id:i:2
use multimon:i:0
desktopwidth:i:1440
desktopheight:i:900
session bpp:i:32
winposstr:s:0,3,-1440,100,1400,900
compression:i:1
keyboardhook:i:2
audiocapturemode:i:0
videoplaybackmode:i:1
connection type:i:2
displayconnectionbar:i:1
disable wallpaper:i:1
allow font smoothing:i:0
allow desktop composition:i:0
disable full window drag:i:1
disable menu anims:i:1
disable themes:i:0
disable cursor setting:i:0
bitmapcachepersistenable:i:1
full address:s:{removed}
audiomode:i:0
redirectprinters:i:1
redirectcomports:i:0
redirectsmartcards:i:0
redirectclipboard:i:1
redirectposdevices:i:0
redirectdirectx:i:1
autoreconnection enabled:i:1
authentication level:i:0
prompt for credentials:i:0
negotiate security layer:i:1
remoteapplicationmode:i:0
alternate shell:s:
shell working directory:s:
gatewayhostname:s:
gatewayusagemethod:i:4
gatewaycredentialssource:i:4
gatewayprofileusagemethod:i:0
promptcredentialonce:i:1
use redirection server name:i:0
drivestoredirect:s:*
username:s:{removed}

Hopefully, others looking to open the RDP windows to a specified location will find the two posts above of use.

Command line terminal server

I’ve just come across a terminal server that wouldn’t let me log on. Turns out the maximum number of users the terminal server is licensed for has been exceeded.

Thusly, from another machine on the network, we open a command prompt and type
qwinsta /server:<servername>

This will give a list of the terminal server sessions on that server, note the ID number (aka sessionid) as we use them in the following commands.

We can reset a session by using
rwinsta <sessionid> /server:<servername>

or we can disconnect the session with
tsdiscon <sessionid> /server:<servername>

or we can logoff a session with
logoff <sessionid> /server:<servername>

Dan Rigsby has more info as does Scott Forsyth.