Assuming you have a domain and use logon scripts, you could add the lines below to each users logon script to create a log file for you. It would give you UserName, ComputerName, date and time in a simple single line.
As written below it will create the log/text file in \\Server\Logs\LogOns.Log and the entries will look like:
Log File
Log On: UserName1 ComputerName1 Fri 09/30/20 8:00
Log On: UserName2 ComputerName2 Fri 09/30/20 8:10
Log On: UserName3 ComputerName3 Fri 09/30/20 8:15
--------------------------
:Logging
If Exist "\\Server\Logs\LogOns.Log"
Echo Log File > "\\Server\Logs\LogOns.Log"
:START
Echo Log On: %USERNAME% %COMPUTERNAME% %Date:~0,12% %Time:~0,5% >> "\\Server\Logs\LogOns.Log"
--------------------------
Note the users will need to have read/write and execute permissions for the \\Server\Logs\LogOns.Log file.
If you only want to log one computer you could add a line at the start, such as:
If %ComputerName% == "ComputerXYXZ" GoTo END
Main Topics
Browse All Topics





by: sirbountyPosted on 2007-03-19 at 11:47:02ID: 18750561
http://support.microsoft.c om/kb/3005 49 details how you can enable auditing.
You can check the Security log (Start->Run->Eventvwr) for the remote system (or Eventvwr \\Machinename) and locate the logon events there.