Get-WinEvent show or filter errors from event log only PowerShell

This post describes how you can filter the results from the Get-WinEvent PowerShell command so only certain entry types are shown e.g. error entries only.

Resolution

Use -FilterHashTable and Level='2'.  You can also specify other levels to show different entry types.

Get-WinEvent -MaxEvents 1 -FilterHashTable @{LogName='System';Level='2'} | Format-Table -Wrap

Get-WinEvent show or filter errors from event log only PowerShell

Comments

Popular posts from this blog

LG TV This app will now restart to free up more memory

LG TV Clear All Browsing History Data

Excel Import CSV not using "Use First Row as Headers"