DOS saves system logs and dos saves logs
1. Export System logs, named after the current date
@ Echo off
Set nowDate = % date %
Set tmp = % nowDate :~ 0,-3%.
Set file = % tmp:/=-% system log. evtx
Echo % nowDate %> % file %
Wevtutil epl system >>% file %
========================================================== ============
2. wevtutil: DOS log command
View All windows Log categories by wevtutil el
Wevtutil epl setup C: \ setup. evtx export setup Log
Wevtutil epl system C: \ system. evtx
Wevtutil epl application C: \ application. evtx
Wevtutil epl hardwareevents C: \ hardwareevents. evtx
Other parameters:
El | enum-logs to list log names.
Gl | get-log to get log configuration information.
Sl | set-log modify log configuration.
Ep | enum-publishers lists event publishers.
Gp | get-publisher: get the publisher configuration information.
Im | install-manifest install the event publisher and log from the list.
Um | uninstall-manifest uninstalls event publishers and logs from the list.
Qe | query-events query events from logs or log files.
Gli | get-log-info get log status information.
Epl | export-log export log.
Al | archive-log archives exported logs.
Cl | clear-log clear log.
========================================================== ======================================
Thank you for sharing:
The doscommand creates a task scheduler TXT file http://www.cnblogs.com/snake-hand/p/3180242.html named by date