(Copy pasted from: michlstechblog.info)
Windows has a built-in command-line utility to deal with Event Logs: wevtutil
Some examples:
List all registered Event Logs:
D:> wevtutil el
Export the System Event Log to a file:
D:> wevtutil epl System c:\%Computername%_System_log.evtx
Export the Application Event Log to a file:
D:> wevtutil epl Application c:\%Computername%_Application_log.evtx
Export the Remote Desktop Event Log to a file:
D:> wevtutil epl Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational c:\%Computername%_rdp_log.evtx
Search the last 100 entries in the Application Event Log for an Event with ID 1704 (in text format):
D:> wevtutil qe Application /q:"Event/System/EventID=1704" /c:100 /f:text
(%Computername% will be replaced by the name of your computer in the exported file names.)
Leave a Comment