Powershell – Eventlog – List Events of last N days with specific source

Querying EventLog using PowerShell.

Count the number of occurences of Kerberos Entries in System Eventlog for the last 24 hours

(Get-EventLog -LogName System -Source Kerberos -After (Get-Date).AddDays(-1)).Count

output the all Kerberos entries in System Eventlog for the last 24 hours:

Get-EventLog -LogName System -Source Kerberos -After (Get-Date).AddDays(-1)

Leave a Reply

Your email address will not be published. Required fields are marked *