Merry Christmas & Happy 2027! Less downtime. More good times. Celebrating 13 years of sorlavit.com
Skip to content
Sorlavit KimIT Support, Network & Infrastructure Services Let’s talk

ปุ่มแปลไทยจะเปิดบทความผ่าน Google Translate เพื่อแปลอัตโนมัติ โดยคงโค้ดและคำสั่งไว้ตามต้นฉบับ

Windows Commands / IT Support Guides

Read recent Windows errors with Get-WinEvent

Reproducing a failure and immediately inspecting its event window can reveal a useful provider and event ID. Restrict the query to avoid drowning the ticket in unrelated history.

Compiled for Sorlavit Kim · Published · Updated · 1 min read

Environment and inputs: Windows 11 · Command Prompt unless PowerShell is specified

Try the diagnostic command

Use the stated shell and platform. Replace sample domains, addresses, services and paths with values from the system you are authorized to support.

Get-WinEvent -FilterHashtable @{LogName='System'; Level=2; StartTime=(Get-Date).AddHours(-2)} -MaxEvents 20 | Select-Object TimeCreated, Id, ProviderName, Message

How to read the result

The filter requests recent error-level System events. An empty result means no matching accessible entries were returned, not that the whole computer is healthy.

What to do next

Compare the timestamps with the exact failure and inspect the relevant provider's message. Include the ID and sanitized message when escalating instead of relying on the event ID alone.

Before you make a change

Some logs require elevation. Event messages may contain personal data, file paths or internal hostnames.

Source & further reading

Microsoft Learn — get-winevent

Independently written summary reviewed on 2026-11-01. The example illustrates a possible application; it is not a client case study.

Share this article

Back to all articles