When something breaks on a Windows box, the answer is almost always written down somewhere. Here’s where I look first.
Event logs
The big three live in Event Viewer under Windows Logs: System, Application, and Security.
Skip the clicking and pull the last hour of errors straight from PowerShell:
Get-WinEvent -FilterHashtable @{
LogName = 'System', 'Application'
Level = 1, 2 # Critical, Error
StartTime = (Get-Date).AddHours(-1)
} | Format-Table TimeCreated, ProviderName, Id, Message -Wrap
Unexpected reboots
Event ID 41 (Kernel-Power) means it went down hard. 1074 tells you who or what asked for a restart:
Get-WinEvent -FilterHashtable @{ LogName = 'System'; Id = 41, 1074, 6008 } -MaxEvents 20
Other places worth knowing
| What | Where |
|---|---|
| Windows Update | Get-WindowsUpdateLog (writes a readable file to your Desktop) |
| IIS | C:\inetpub\logs\LogFiles\ |
| Setup / upgrades | C:\Windows\Panther\ |
| Crash dumps | C:\Windows\Minidump\ |
| Group Policy | gpresult /h report.html |
The rule
Before you reboot it, reinstall it, or open a ticket: read the logs.