We have 200 PCs in a library at are college and we want to monitor which student are logging into them on a daily basis. We want log files generated and stored on ONE central server.
I know we can enable auditing but that creates events in the security log on the DC that logs the student in. We have got loads of domain controllers here and the IT director doesn't want to be trawling through event viewer on all of them.
Here is the kicker. We are trying to find a way of doing this for free. Does someone have a script or something?
Many thanks
Windows Server 2003Windows Server 2008Active Directory
Last Comment
dth123
8/22/2022 - Mon
KenMcF
the best solution would be some type of log management system. Take a look at Splunk.
You will also need to check your auditing level.
To record user logons to a text file (log.txt) containing computer name, time and date etc. I add a logon script to the group policy settings for the users concerned that contains the following (saved as a vbs file):
Option Explicit
Dim Message
Dim WshShell, objEnv
Dim objFSO, objFolder, objShell, objTextFile, objFile
Dim strDirectory, strFile, strText, strTestForDir
strDirectory = "\\servername\logs$"
strFile = "\log.txt"
' Get the WshShell object.
Set WshShell = CreateObject("WScript.Shell")
' Get collection by using the Environment property.
Set objEnv = WshShell.Environment("Process")
' Create the File System Object
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(strDirectory)
Message="Logon"
set objFile = nothing
set objFolder = nothing
Const ForAppending = 8
Set objTextFile = objFSO.OpenTextFile _
(strDirectory & strFile, ForAppending, True)
Message = objEnv("Username") & "," & objEnv("computername") & "," & Time & "," & date & "," & Message
' Writes message every time you run this VBScript
objTextFile.WriteLine(Message)
objTextFile.Close
WScript.Quit
' End of VBScript to write to a file with error-correcting Code
You will also need to check your auditing level.
http://www.splunk.com/
http://www.nagios.org/products/enterprisesolutions/splunk
http://technet.microsoft.com/en-us/library/dd772662(WS.10).aspx