Would you like to learn how to filter Windows event logs using Powershell? In this tutorial, we are going to show you how to filter event logs using the command line.
• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 2022
• Windows 10
• Windows 11
Equipment list
Here you can find the list of equipment used to create this tutorial.
This link will also show the software list used to create this tutorial.
Related tutorial – PowerShell
On this page, we offer quick access to a list of tutorials related to PowerShell.
Tutorial Powershell – Filtering Windows event logs
Start an elevated Powershell command line.
List all log files.
Here is the command output.
Get a summary of all log files.
Get a summary of all enabled log files with records greater than 0.
Here is the command output.
List all log provider names.
Here is the command output.
List the type of events available on a specific log provider.
List the events of a classic log file.
List the events of a modern log file.
Filter events using the log name.
Filter events using the log name and the event ID.
Filter events with a specific start date.
Filter events with a specific start and end date.
Filter events within a specific time interval.
There are multiple ways to filter date and time.
Filter events using the error level.
Filter events using the message content.
List all the fields available to filter an event.
Here is the command output.
Get the name and value of all fields of an event.
Congratulations! You are able to filter Windows log events using Powershell.