Locked yourself out of Terminal Services? Give this a whirl!

One issue I have run into time and time again at work is when either myself or colleagues leave themselves logged into Terminal Services (using Remote Desktop Protocol or RDP for short) on a server and therefore lock out anyone but themselves from logging back ON to the server. Obviously this is targeted at servers running on the Wintel architecture.

This issue cropped up for me again and I was struggling to find a way to kick the other terminal services connections or terminate them or (well LOL I had a few other thoughts that were kinda graphic but hey we are trying to be professional here). Luckily a colleague was able to assist me and gave me this gem which I was unable to find elsewhere on the net (probably from a lack of the correct keywords).

If you need to force access to the console session for a host running Microsoft Windows Server 2003, MS Windows Server 2008 or probably a host of other Windows server and desktop hosts, give this little command line switch a try.

On the run command prompt of the computer you are connecting from (the guest) instead of running plain old ‘mstsc’ instead run ‘mstsc /v:hostname.yourdomain.com -console /admin’.

I have no idea why (and will try to do some research later unless someone else can shed light on this) the straight up ‘-console’ switch did not work as a lot of people on the net said it would, without the ‘/admin’ switch I just kept getting the error “Terminal Services had reached the maximum number of licences” and so on.

So… I hope this helps you out next time pesky wabbits leaveĀ themselvesĀ logged onto your servers and stop you from logging on to RDP.

Stuart