ExchangeNerd

Powered by Ed Buford and Coffee

Get your top 5 Errors out of your Event logs

So many times I want to know what Errors are filling up the logs on a server.
Here’s a quick PowerShell to show you the top 5 Errors in your Application or System Logs.
Use this one for Application Log Errors:

Get-EventLog -LogName Applicaiton -EntryType error | Group source,eventid | Sort count -Descending | select -First 5 | FT count,Name

And this one for System Log Errors:

Get-EventLog -LogName system -EntryType error | Group source,eventid | Sort count -Descending | select -First 5 | FT count,Name

Tags: , , ,

2 Responses to “ Get your top 5 Errors out of your Event logs ”

  1. Mike Quinn says:

    The two commands are the same, at least when I run them it returns the same info.

    • Ed Buford says:

      Mike,

      Good eye. The first one command should say Application not System. Sorry looks like I fat fingered.
      I went ahead and updated the post.

      -Ed

Leave a Reply

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