← Knowledge Base
WindowsReference note1 min read · updated 2026-11-27

Event Viewer: where Windows writes what went wrong

Which logs to open, how to filter them and how to query them from PowerShell.

eventviewerlogstroubleshooting

Open eventvwr.msc. The useful logs: Windows Logs → System (drivers, services, disk, shutdowns) and Application (program crashes), plus Applications and Services Logs → Microsoft → Windows → ... for specific components. Use Filter Current Log for level (Critical, Error, Warning) and a time range; look for the first error around the time of the problem.

Get-WinEvent -FilterHashtable @{LogName='System'; Level=1,2; StartTime=(Get-Date).AddDays(-1)} | Select -First 20 TimeCreated,ProviderName,Id,Message
Get-WinEvent -FilterHashtable @{LogName='Application'; ProviderName='Application Error'} -MaxEvents 10

Event ID 41 (Kernel-Power) means an unexpected shutdown; 6008 an unexpected previous shutdown; 7034/7031 a service crashed. Search the exact Event ID and source for causes.