Scripting‎ > ‎

PowerShell Script: Filtering the Event Logs

The following PowerShell script can be used to filter events from the Windows Event Logs.


$PXEEvent =  Get-WinEvent -LogName System

$PXE = $PXEEvent |where {$_.id -match "4096"}

$PXE | sort timecreated -descending | Format-Table TimeCreated, ID, Message

Comments