> ## Content Index
> Fetch the complete content index at: https://www.filipkonopik.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# PowerShell: Find System Errors in Event Log
- URL: https://www.filipkonopik.com/powershell-find-system-errors-in-event-log/
- Published: 2026-07-27T10:32:04.000Z
- Updated: 2026-08-06T05:44:50.000Z
- Author: Filip Konopík
- Tags: Event Logs & Monitoring

Need to check for system-level startups, shutdowns, and unexpected crashes - for troubleshooting stability issues or confirming clean reboots? This one-liner filters the System log for the relevant events.

Prerequisites:

- Privileges: None
- Module: Built-in, no import needed

Quick Command:

```Powershell
Get-WinEvent -FilterHashtable @{LogName='System'; Id=6005,6006,6008} -MaxEvents 5
```

Example Output:

```powershell
ProviderName: EventLog
TimeCreated                     Id LevelDisplayName Message
-----------                     -- ---------------- -------
7/14/2026 11:25:26 PM         6005 Information      The Event log service was started.
7/14/2026 11:24:57 PM         6006 Information      The Event log service was stopped.
7/14/2026 11:24:22 PM         6005 Information      The Event log service was started.
```

📦

****Want all of them at once?**  
Get every free one-liner from this blog in a single downloadable bundle organized by category, each with full comment-based help. No more copy-pasting one at a time.

[Get the Complete Bundle for $39](https://gum.co/u/oczvkqdc?ref=filipkonopik.com)

How It Works:

- LogName='System' targets the System log, where OS-level and driver events get recorded - separate from Application (program crashes) or Security (logon/audit events).
- Id=6005,6006,6008 filters for three related Event IDs: 6005 fires when the system starts up, 6006 fires on a clean/expected shutdown, and 6008 fires specifically for an unexpected shutdown (like a power loss or crash) - the most useful of the three for troubleshooting.
- \-MaxEvents 5 limits the output to the most recent matches.