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?
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
"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
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
--Rob
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