Glenn's solution will work for the user that runs it. Great way to figure out if the current logon session is a TS session and if needed execute special logon scripts for that.

If you need/want a list of all users on your TS then you'll need a solution like mine or you could use QWINSTA (build in by MS) and walk through the output line by line.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.