Link to home
Start Free TrialLog in
Avatar of menreeq
menreeq

asked on

Terminal Server session logging

I'm using the instructions from https://www.experts-exchange.com/questions/23202062/Logging-Terminal-Server-Access.html?sfQueryTermInfo=1+"comput+name"+connect+log+server+termin to create a batch file to log when users log on to my terminal server.

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?
Avatar of Rob Williams
Rob Williams
Flag of Canada image

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.

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/robwill/archive/2008/06/12/determine-if-the-terminal-server-console-session-is-in-use-from-a-command-line.aspx
ASKER CERTIFIED SOLUTION
Avatar of menreeq
menreeq

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of menreeq
menreeq

ASKER

Thanks for your response RobWill.  

"CLIENT NAME as displayed in Terminal Services Manager"

this is the connecting computer's computername, if you look in my code above, you'll see that I found an application/environment variable to suit my need.
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
Never met an Australian I didn't like, and as you say, they have some great minds waaaay down there.
--Rob