1, create a log directory, such as the C disk under the establishment of an RDP directory "C:/RDP."
2, and then in the "C:/RDP" directory to create a name "RDPlog.txt" text File "C:/rdp/rdplog.txt".
3, and then in the "C:/RDP" directory to create a name "Rdplog.bat" batch file, the content is:
date/t >>rdplog.txt
time/t >>rdplog.txt
Netstat-n-P TCP | Find ": 3389" >>rdplog.txt
Start Explorer
4. Access to Control Panel---management tools---Terminal Server configuration---RDP-TCP---properties-environment-enable the following programs when a user logs on---The program path and filename---write "c:rdprdplog.bat"---start with---write "c:rdp" That's OK. The next time you log in with the terminal will automatically record the IP address to "C:/rdp/rdplog.txt", open directly to see the line.
The method is super simple, we just need to write a. bat file. netstat-n-P TCP | Find ": 3389" >>rdplog.txt, the filename can be modified on its own.