This is basically a note to myself, as BizTalk person you tend to remotely login to multiple machines frequently. Often time I’ll be greeted with the message "Terminal services exceeded the maximum connections". The main reason will be, people tend to login and don’t bother to logoff. For me the quickest way to figure out all the logged in user and kick them off is by couple of commands

The first one to see all the logged in sessions using the command:

qwinsta /server:<<servername>>


qwinsta /server:UKRAS923WIN2K (btw, this is just a factious name :-))

To disconnect someone after seeing their long inactive period. you simple use this command

rwinsta /server:<<servername>> <ID>

Example: rwinsta /server:UKRAS923WIN2K 3