Presumably you're thinking of PCs that run a domain logon
script. If so then you could insert the following line into that script:
@echo off
for /F "tokens=3 delims=[] " %%a in
('nbtstat -a %ComputerName% ^| find /i "ipaddress"')
do echo %date% %time% %UserName% %ComputerName% IP=%%a(This is all one long line. Do not add or remove spaces unless you
know what you're doing!)
The line will work for Win2000/WinXP clients. If you have many
clients then a more sophisticated solution will be required because
it is likely that two clients will attempt to write to the log file at the
same time, creating a sharing conflict.
If you enable account logon events in the Domain Controller Security Policy,
you will see logons for computers recorded in the security logs of the
domain controllers though it may not show the IP but the computer name
instead which you should be able to find the IP addresses from the dns zone
host records, wins database, or dhcp leases. Keep in mind that W98/ME
computers do not logon to the domain like W2K/XP Pro computer do though the
user logon record could show the name of the computer that a user used to
logon to the domain in that case. --- Steve