Hello Experts,
I am hoping someone can assist me with this challenge I am facing. I have a Windows 2000 Server which is just a member server part of a DOMAIN. It has about 200 LOCAL computer users which are used to only authenticate into a special group of users to use an application running on this server. I need to find a way to run a utility or a script which can tell me the LAST LOGON TIME for the LOCAL users only. This is to allow us to perform audit administration. Please note, this is not a script or a tool for AD or the DOMAIN, it is only for the local computer/server accounts.
I would appreciate anyone's assistance on this matter. Thank You
Dim objWMI
Dim objNet: Set objNet = CreateObject("Wscript.Netw
Dim colUsers: Set colUsers = GetObject("WinNT://" & objNet.ComputerName)
colUsers.Filter = Array("user")
intLogonID = 540 'Event ID for successful logon
For Each objUser In colUsers
Set objWMI = GetObject("winmgmts:{imper
strQry = "Select * from Win32_NTLogEvent Where EventCode='" & intLogonID & "' And User='" & objUser.Name & "'"
Set colEvents = objWMI.ExecQuery(strQry)
For Each objItem In colEvents
wscript.echo objItem.SourceName, objItem.EventCode, objItem.Type, objItem.User
wscript.echo objItem.Message
Next
Next