Sub topic 2
Reading Event Viewer and System Logs
Event Viewer is the built-in Windows tool that records what the operating system, services, drivers and applications report about themselves. In the CompTIA troubleshooting methodology, it is your main source of evidence when you identify the problem and establish a theory of probable cause. This chapter covers how to open it, how the logs are organized, how to read one entry, and how to filter for the entries that matter.
This chapter assumes you can open the Command Prompt and PowerShell, you know what a service and a driver are, and you have read the chapter on the troubleshooting methodology.
Where Event Viewer fits
Event Viewer does not fix anything. It tells you what happened and when. A user who says "the computer was slow and then the app closed" gives you a symptom. The log can give you the exact time, the faulting component and an error code. You then use that evidence to test a theory.
You can open it in several ways:
- Press Win+R, type
eventvwr.mscand press Enter. - Right-click Start and choose Event Viewer.
- Open Computer Management and expand System Tools.
You need administrator rights to read some logs, such as Security. Standard users can usually read the Application and System logs.
The main log categories
The left pane groups logs into two branches.
Windows Logs are the core logs, and the A+ exam expects you to know these five:
| Log | What it records | Typical use |
|---|---|---|
| Application | Events from installed programs | Crashes, failed installs, app errors |
| System | Events from Windows components, drivers and services | Boot problems, driver failures, service failures, unexpected shutdowns |
| Security | Audit events such as logons and access to objects | Failed logons, permission problems |
| Setup | Events from installation and update activity | Failed updates and feature installs |
| Forwarded Events | Events collected from other computers | Central monitoring in a managed network |
Applications and Services Logs hold logs for individual components, such as Windows Update, PowerShell or Windows Defender. Use them when the main logs do not give enough detail.
A quick rule for matching a symptom to a log:
- An application crashes or will not install: check Application.
- A service fails, a driver fails or the PC restarts on its own: check System.
- Someone cannot sign in or reports an access problem: check Security.
Event levels
Every event has a level that shows its severity.
| Level | Meaning |
|---|---|
| Information | Something completed normally |
| Warning | Something might become a problem later |
| Error | A function failed |
| Critical | A serious failure, such as an unexpected shutdown |
| Audit Success / Audit Failure | Security log only, showing an allowed or denied action |
Do not treat every Error as the cause of your problem. A healthy computer often has a few errors in its logs. What matters is whether an error appears at the time the symptom occurred.
Anatomy of a single event
Select an event and the lower pane shows the General and Details tabs. These fields matter most:
- Source: the component that wrote the event, such as a service name or a driver.
- Event ID: a number that identifies the type of event. Search the ID together with the source, because the same number can mean different things for different sources.
- Level: the severity.
- Date and Time: lets you line the event up with the user's report.
- Task Category and Keywords: extra grouping information.
- Description: the human-readable message, often naming a file, module or error code.
Some Event IDs are worth recognizing. These come up often in real work, though the exam is more likely to test the log name and the method than the number itself.
| Event ID | Log | Meaning |
|---|---|---|
| 41 | System | Kernel-Power: the system rebooted without a clean shutdown |
| 1000 | Application | Application Error: an application crashed, and the message names the faulting module |
| 7000 / 7001 | System | A service failed to start, or failed because a dependency failed |
| 7034 | System | A service terminated unexpectedly |
| 6008 | System | The previous shutdown was unexpected |
| 4625 | Security | A logon attempt failed |
Filtering to find the signal
A busy computer writes thousands of events a day. Scrolling through them is slow and error-prone. Use these approaches instead:
- Select the right log, such as System.
- Choose Filter Current Log in the Actions pane.
- Set a time range around the symptom, such as the last 24 hours.
- Tick Critical, Error and Warning.
- Narrow by Event source or Event ID if you already have a lead.
For a repeating problem, use Custom Views. A custom view saves a filter that can combine several logs. The built-in Administrative Events view already collects Critical, Error and Warning events from all logs, which is a good starting point.
You can also look at events from before the symptom. A service failure at 08:02 may explain an application error at 08:03. Read in time order and look for the first failure, not only the last one.
Reading logs with PowerShell
PowerShell can query the same logs, which is useful on remote sessions and in scripts. This command lists the ten most recent Application log errors from the past day:
Get-WinEvent -FilterHashtable @{ LogName = 'Application'; Level = 2; StartTime = (Get-Date).AddDays(-1) } | Select-Object -First 10 TimeCreated, ProviderName, Id, MessageIn Level = 2, the number 2 means Error. Level 1 is Critical, 3 is Warning and 4 is Information. The command helps you match an application crash to a specific faulting module or time.
For services, you can combine the event log with a check of current service state:
Get-Service | Where-Object { $_.StartType -eq 'Automatic' -and $_.Status -ne 'Running' } | Select-Object Name, DisplayName, StatusThis finds services set to start automatically that are not running. Compare the names with System log events 7000, 7001 and 7034 to find out why they stopped.
A worked example
A user reports that the computer restarted by itself twice this morning.
- Identify the problem. Ask when it happened, what the user was doing and whether anything changed recently, such as a new driver or update.
- Gather evidence. Open Event Viewer, select the System log and filter for Critical and Error over the last 24 hours.
- Read the entries. You find Event ID 41 from Kernel-Power at 07:40 and 08:15. The entries just before each one show a display driver error.
- Form a theory. A faulty or recently updated graphics driver is the probable cause.
- Test the theory. Roll back or update the driver, then watch for new restarts.
The log did not prove the cause on its own. It pointed to a likely cause that you then tested. Event 41 tells you the restart was unclean. The nearby driver errors suggest why.
Common errors when using Event Viewer
- Blaming the first red icon. Many errors are harmless and old. Check the timestamp against the symptom.
- Reading the wrong log. Application crashes can leave related entries in System too, but start with the log that matches the component.
- Ignoring Warnings. A repeated Warning about a disk or a driver often comes before the Error.
- Trusting the Event ID alone. Always include the Source when you search.
- Clearing the log too early. Clearing destroys your evidence. Save the log first with Save All Events As, which creates an
.evtxfile you can send to a colleague. - Forgetting the clock. If the system time is wrong, timestamps will not line up with the user's report. See the chapter on time drift.
Saving and sharing evidence
When you escalate a ticket, attach evidence. In Event Viewer, right-click the log or a custom view and choose Save All Events As. Choose the .evtx format to keep full detail. You can also copy a single event's text from the General tab. Record the time, source, Event ID and your own note about what the user was doing. This also fits the last step of the methodology, which is to document findings, actions and outcomes.
Exercise
A user says Microsoft Word closed unexpectedly at about 10:30. Which Windows log should you check first, and what should you filter for?
Show answer
Check the Application log. Filter for Error (and Critical) events around 10:30, then look for an Application Error event (ID 1000) whose Description names Word and the faulting module.
Exercise
A computer restarts on its own, and the System log shows Event ID 41 from Kernel-Power. What does the event tell you, and what is your next step?
Show answer
It shows the system restarted without a clean shutdown. It does not name the cause. Look at the events just before it for driver, disk or hardware errors, form a theory, and test it, for example by updating or rolling back a driver.
Exercise
Why should you save a log before clearing it?
Show answer
Clearing a log permanently removes the events, which are your evidence. Saving it as an .evtx file keeps the evidence for later analysis or for another technician.