ArtinSoft's Blogs

Software Migration Experts
Welcome to ArtinSoft's Blogs Sign in | Join | Help
in Search

Jose Aguilar's Blog

All things migrations, software and technology

February 2008 - Posts

  • Killing open Terminal Services sessions remotely

    This tip isn't really migration-related, but I've used it so many times these past few days that I think it is worth sharing. We work with virtual machines A LOT, using Virtual Server 2005 R2 SP1. Every once in a while you need to log into a server using Terminal Services to delete old VHDs to make room for a new one, opr just for any other miscelaneous task that can't be done through the web administration client. And, unfortunately, sometimes there are two terminal services sessions open already, so you get the following error:

    "Terminal server has exceeded maximum number of allowed connection"

    You then stare at your monitor in frustration for a few seconds. After that, you figure out who the culprit is and ask him politely to "PLEASE LOG OFF".

    Well, after discovering this tip, there is no longer a need to stare at your monitor or to ruin your relationship with your coworkers. Turns out there are a couple of command line tools you can use to close remote Terminal Services sessions. They are available in both Windows XP and 2003. The first one, qwinsta, lists all the open sessions on a particular server:

     c:\>qwinsta /server:192.168.123.123
     SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
     console                                     0  Conn    wdcon
     rdp-tcp                                 65536  Listen  rdpwd
                       jpena                     1  Disc    rdpwd
                       administrator             3  Disc    rdpwd

    In this case, you can see that Juan Peña (user jpena) has an open session in the disconnected state. In order to close his session, you need to use the second tool, rwinsta:

    rwinsta /server:12.12.12.12 3

    This command will kill the session with ID 3 (jpena's). And voilà! After this, I'm able to connect to the server. :-)

    Credit goes to Scott Forsyth's WebLog.

    Posted Feb 29 2008, 05:22 PM by Jaguilar with 14 comment(s)
    Filed under:
  • Windows Server 2008 released

    A quick post to tell everyone that the day finally came: Windows Server 2008 was released today. You can find more information about it on the Windows Server 2008 page, and watch the keynote here.

    The biggest deal, from my perspective, is Hyper-V. This will have a significant impact on the IT market, by exposing thousands of IT profesionals to a hipervisor-based virtualization solution. Another very interesting technology is RemoteApp, which allows you to use, through Terminal Services, just one application instead of the complete desktop. It solves a deployment issue that required expensive software solutions in the past - and something we run into every once in a while when determining the best deployment strategy for migrated Informix 4GL applications.

This Blog

Syndication

Powered by Community Server (Non-Commercial Edition), by Telligent Systems