On which TS server (Windows 2003) does the user have a session?

On a customer site with Windows 2003 R2 servers with terminal services and no extra  administration tooling we have the the following problem. When the helpdesk wants to find out on which TS server a user session is located he/she can find this out by opening the tsadmin.exe tool and lookup the username. When you have four terminal servers the tsadmin tool still works but it is not practical.  On this particular customer site we are planning to upscale the terminal server environment up to eight servers. Now we can easily say that using tsadmin is no longer an option.

I wrote an simple but effective batch script to accomplish this task:

quser %1 /Server:aposrv010
quser %1 /Server:aposrv011
quser %1 /Server:aposrv020
quser %1 /Server:aposrv021

I saved the script as qfarm.cmd Knipogende emoticon

If the helpdesk wants to find out on which TS server the user apojat has an session they type the following command.

qfarm apojat

This is the output from the script:

qfarm screen

Was once an enthusiastic PepperByte employee but is now working at Ivanti. His blogs are still valuable to us and we hope to you too.