Displaying the Windows Event Log with PowerShell

The latest post in the  PowerShell Box of tricks series is here.

I’ll start by saying this is a bit of a cheat. PowerShell has a perfectly good cmdlet called Get-EventLog and plenty of ways to use it

I created this function because I like to use Out-GridView and specify only a few records so it is quicker on remote systems. I like Out-GridView as it enables me to filter easily by typing in the top box. This is most often used via the simple GUI I have created. At the command line I would just use Get-EventLog


The function is shown below. It is important to know that the $log parameter is CaSeSensItive


The Code is here


Please feel free to comment on this post. All comments are moderated first before appearing on the site