Log IP addresses of machines logged in Event Viewer?

Log IP addresses of machines logged in Event Viewer?

Post by salmons » Tue, 01 Jul 2003 23:11:25


Hello,

I was wondering if anyone is logging the IP addresses of the machines
they see in their event viewer, and if so how they are doing it.

Thanks,

Michael Salmons
XXXX@XXXXX.COM
 
 
 

Log IP addresses of machines logged in Event Viewer?

Post by MV » Thu, 03 Jul 2003 09:05:38

Under Win2000/XP you can add this line to your
users' logon script:

for /F "tokens=2 delims=:" %%a in ('ipconfig ^| find /i "IP Address"') do
set IP=%%a
echo %date% %time% %UserName% %ComputerName% %IP% >>
\\YourServer\Logs\%ComputerName%.log

Unwrap these lines.
You will have to consolidate the various log files into a common
log file each day.