Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Retrieve Information About the Latest Event Added to an Event LogContent of Retrieve Information About the Latest Event Added to an Event Log.vbsMD5 Hash: 550480C320BFA3F8F2012D812501FB16 |
||
strComputer = "."
Set objWMIService = GetObject("winmgmts:{(Security)}\\" & _ strComputer & "\root\cimv2") Set colLogFiles = objWMIService.ExecQuery _ ("Select * from Win32_NTEventLogFile where LogFileName='System'") For Each objLogFile in colLogFiles intTotal = objLogFile.NumberOfRecords Next Set colEvents = objWMIService.ExecQuery _ ("Select * from Win32_NTLogEvent Where Logfile = 'System' " & _ "AND RecordNumber = " & intTotal) For Each objEvent in colEvents Wscript.Echo "Time Written: " & objEvent.TimeWritten Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |