I was able to find an app called 'envtscip' to assist me with this. my code is posted below.
Main Topics
Browse All TopicsI'm using the instructions from http://www.experts-exchang
I'd like to also log the CLIENT NAME as displayed in Terminal Services Manager. I've discovered the command QWINSTA to display session stats, but the 'DEVICE' field is always blank. Is there a way to get this command to display the client name/device? If not, what other way could I go about it?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Sounds good. Glad you were able to find a solution.
Where this will be readable for eternity, it would be nice to give Warren Simondson of www.ctrl-alt-del.com.au credit for the script.
Cheers !
--Rob
Business Accounts
Answer for Membership
by: RobWillPosted on 2008-11-10 at 05:18:42ID: 22921104
I (writer of the script) am not sure what you mean by "CLIENT NAME". The script logs the computer name as well as the user/client name, as it is now. Perhaps if you can clarify we can add the necessary information.
bwill/arch ive/2008/0 6/12/deter mine- if-th e-terminal -server-co nsole-sess ion-is-in- use-from-a - command-l ine.aspx
There is the "sessionname" command that gives you the same information plus the temporary session name, but I cannot see logging that as being of much use:
http://msmvps.com/blogs/ro