📎 AI Summary:
The original poster is seeking help to identify the remote computer’s hostname and user details when accessing their Windows Server 2008 R2 via Remote Desktop. They have a script that logs logon date, time, username, and server name but don't know how to capture the remote client’s hostname. They mention using "netstat" to find the remote hostname but are asking for a batch script to automate and log this information effectively. The overall tone is one of seeking technical assistance to improve remote login logging.

NewComer01

New Member
Member details
Joined
Dec 31, 2014
Messages
2
Thread Author #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!
 

NewComer01

New Member
Member details
Joined
Dec 31, 2014
Messages
2
Thread Author #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.