Win Server2008 - How to know who/hostname accessing by RDP

#1
Dear All,

I would know who/hostname/date/time that accessing to my Win server 2008 R2 via a remote desktop connection, so i have a script with command ECHO to show these information to text file once user logon, but i donot know which environment variables for exactly who is remoting session and which host name (remote computer). Pls help!

echo Log ON %Date% %TIME% %USERNAME% %COMPUTERNAME% >> %RDP%.log

%computername%: is my server name 2008 (not remoting computer name)

Thanks for your advise!
 


#2
actually, i can find out remoting host name by netstat, but i am appreciated if you share the batch file or script which I can extract a a log auto.
 


This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.
Top