Windows 2003 logging remote desktop login user IP method

  

Windows2003 Terminal Service is a log function, about the user remote login log, you can from the "management tools" -> "> & ldquo; log viewer" View in. But it does not record the client's IP (only view the online user's ip) but record the computer name, then we can create a .bat batch file, save the ip's ip, as follows.

1, first create a new text document, and then save it as a batch file with .bat or .cmd suffix (we name it here: login.bat (or login.cmd). If you can't view the file name Suffix, you can open my computer
/tools/folder options/view/clear<; hide the extension of the known file type> front hook. 2. Then select edit in the login.bat right click, Copy the following into it:

echo offdate /t >>D:templogin.logtime /t >>D:templogin.logecho Protocol Local IP Address Remote IP Address Connection Status>> D:templogin.lognetstat -an -p tcp | Find ":3389" >>D:templogin.logstart explorerecho ________________________________________________ >>D:templogin.log

Note: where find ":3389" is the 3389 port for remote login, if you Change the port 3389 to the corresponding port; D:templogin.log is the path to the log file, which can be changed at will.

3. Copy this login.bat file to a directory (such as D:temp).

4, click & rdquo; start & ndash; program & ndash; management tools & ndash; terminal service configuration & ndash; link “, select "RDP-TCP" in the right column, right click to open the "Attributes" Dialog box, click Open "Environment<;Entry, check">; Start the following program when the user logs in; fill in the two text boxes: D:templogin.bat Write in the start position: D:temp Click OK After restarting the computer, log in again, check the probability of the login.log file, and determine whether the configuration is correct and valid.

Copyright © Windows knowledge All Rights Reserved