PowerTip: Query Multiple Event Logs at Once

Summary: Learn how to use Windows PowerShell to query multiple event logs at one time.

Hey, Scripting Guy! Question How can I use Windows PowerShell to query events that happened and may be in multiple event logs?

Hey, Scripting Guy! Answer Use the Get-WinEvent cmdlet, specify the LogName parameter for both logs, and specify today
           for the StartTime, for example:

Get-WinEvent @{logname='application','system';starttime=[datetime]::today }

Comments (1)

  1. Ruud Borst says:

    Nice! Look at my Technet Gallery contribution if you need a GUI based Event Log Tool which searches Events in all Event Logs on the system.

Skip to main content