Announcement

Collapse
No announcement yet.

Collect 5 Most Recent Windows Event Logs In System Category ( Python )

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Collect 5 Most Recent Windows Event Logs In System Category ( Python )

    You can collect the 5 most recent Windows Event logs in system category with below script:

    import os;
    syslogs=os.popen('wevtutil qe System "/q:*[System [(Level=2)]]" /f:text /c:5 /rd:True').read()
    print(syslogs);

    Example output would be:
    Click image for larger version

Name:	System log.png
Views:	1
Size:	22.0 KB
ID:	4433

Working...
X