Wednesday, August 8, 2012

How to Export Events Log including "Event Description" from Windows Event Viewer

This is how you can get the details Event Log Description from Windows Event Viewer. The script is available on Windows OS.

cscript c:\windows\system32\eventquery.vbs /fi "Type eq Information" /fi "Source eq Print" /fi "ID eq 10" /v  /l System /fo csv > Event_Viewer_System.csv

The syntax I used was to filter (/fi) out
    Events equal the type “Information”
    filter out Source equal to “Print”
    filter out ID equal “10"    and have a verbose (/v) output
    from the System log (/l System)
    output as comma separated file (/fo)
    and redirect the result to a file > filename.csv
Sample File Output:
"Information","10","12.05.2009 13:24:48","Print","Servername","None","AD\username","Document 232, filename.pdf owned by username was printed on printername via port IP_192.168.0.254. Size in bytes: 279232; pages printed: 1"

This method also can be use to export from any Event Viewer data log like Application, Security, Internet Explorer or other logs you have on your system.

Source URL: http://technet.microsoft.com/en-us/library/bb490900.aspx

Source URL : http://pario.no/2009/05/13/exporting-events-including-event-properties-from-windows-event-viewer/

Source URL: http://pario.no/2009/05/15/simple-windows-print-accounting-using-event-viewer-data/