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

You can collect 20 most recent Windows Event logs in system category with below script:
import os;
syslogs=os.popen(‘wevtutil qe System /f:text /c:20 /rd:True’).read()
print(syslogs);

Example output would be:

Thanks for all the event log scripts, I was working on one in powershell but this may do what I need. I will have to do some testing :slight_smile:

Whatever scripts you need, pls tell us, we’ll be more than happy to write it for you.