Show the latest Windows system errors
Build a paste-ready command, then review its compatibility and effects before running it.
Get-WinEvent -FilterHashtable @{LogName='System'; Level=2} -MaxEvents 20read-onlyno known side effects Compatibility
WindowsVerified for Windows using powershell syntax.
Operational knowledgereview due 2027-01-19
RequirementsGet-WinEventGet-WinEvent must be installed and available on PATH.
Version supportGet-WinEvent Current supported releasesVerified for windows using powershell syntax; consult compatibility notes for platform-specific differences.
Expected signalsProviderName: Service Control ManagerRepresentative successful output; values vary with the selected target and system state.
Known errorsGet-WinEvent: command not foundGet-WinEvent is missing or is not available on PATH.
VerifyGet-WinEvent -FilterHashtable @{LogName='System'; Level=2} -MaxEvents 20The output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01Get-WinEventCommandRuns the Get-WinEvent stage of this one-liner.
02-FilterHashtableOptionConfigures Get-WinEvent with the -FilterHashtable option.
03@{LogName='System'ArgumentPasses @{LogName='System' to Get-WinEvent.
04;Command separatorEnds this shell statement before the next one begins.
05Level=2}Variable assignmentSets a value used by the commands that follow.
06-MaxEventsCommandRuns the -MaxEvents stage of this one-liner.
0720ArgumentPasses 20 to -MaxEvents.
Example input
Get-WinEvent -FilterHashtable @{LogName='System'; Level=2} -MaxEvents 20
Example output
ProviderName: Service Control Manager
TimeCreated Id LevelDisplayName Message
----------- -- ---------------- -------
23.07.2026 09:14:22 7000 Error The Backup Agent service failed to start.
23.07.2026 08:52:07 7031 Error The Print Spooler service terminated unexpectedly.
Illustrative output — exact values vary by system and data.
Runbooks
Official sources