Discussion Locked

Logon/logoff tracking

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Where can I find or how do I create a step by step GPO script procedure to track domain users log on and log off activities on a windows 2003 server? I haven't script before.

4 replies

by jeremy.rhoades

The low tech way to go is to modify the login and logoff scripts to write some basic information to a text file. In my own network I track the username, computername, time, date and ipaddress when my users log on to the system. I have a line in my login script that looks like this:

echo %username%, %computername%, %date%, %time%, %IPADDR% >>\\servername\sharename\%username.txt

This allows you to track activity for individual users. You can set up a automated task to purge the directory however often you need to. You can also easily import these tables into SQL since it echoes as CSA format. (Just a side note, the IPADDR variable had to be custom build by parsing some output with the FOR command). The big advantage of this is you don't have to search through all of your DCs to find out when and where someone has logged on. Hope this helps!

by bcouture

With this line:

echo %username%, %computername%, %date%, %time%, %IPADDR% >>\\servername\sharename\%username.txt

only some users work and only some of the time. I need this to ork 100%. Any thoughts?

This discussion is closed to new replies.