DOS saves system logs and dos saves logs

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.