Challenge - 5 Problems
Event Log Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of this PowerShell command reading event logs?
Given this command, what will it output?
PowerShell
Get-EventLog -LogName System -Newest 3 | Select-Object -Property EventID, SourceAttempts:
2 left
💡 Hint
The System log contains events from system components like Service Control Manager.
✗ Incorrect
The command fetches the 3 newest events from the System log. Typical EventIDs include 1001, 7000, and 6005 with sources like Service Control Manager and EventLog.
📝 Syntax
intermediate2:00remaining
Which option correctly filters Application log events with EventID 1000?
Select the PowerShell command that correctly gets Application log events where EventID equals 1000.
Attempts:
2 left
💡 Hint
Remember to use $_ to refer to the current object and -eq for comparison.
✗ Incorrect
Option B uses correct syntax: $_.EventID -eq 1000 inside Where-Object. Options A, C, and D have syntax errors or wrong operators.
🔧 Debug
advanced2:00remaining
Why does this script fail to get Security log events?
This script returns an error: Get-EventLog -LogName Security -Newest 5
Error: Access is denied.
What is the cause?
Attempts:
2 left
💡 Hint
Security logs require special permissions to access.
✗ Incorrect
Reading the Security event log requires running PowerShell as administrator. Without it, access is denied.
🚀 Application
advanced2:00remaining
How to export the last 10 System log events to a CSV file?
Which command exports the last 10 events from the System log to a CSV file named systemlog.csv?
Attempts:
2 left
💡 Hint
Use the -Newest parameter and Export-Csv with -NoTypeInformation to avoid extra type info.
✗ Incorrect
Option D correctly uses -Newest 10 and exports to CSV with no type info. Option D uses Select-Object -Last which is less efficient. Option D redirects output as text, not CSV. Option D uses invalid parameter -Last.
🧠 Conceptual
expert2:00remaining
What is the main difference between Get-EventLog and Get-WinEvent for reading event logs?
Choose the correct statement about the difference between Get-EventLog and Get-WinEvent.
Attempts:
2 left
💡 Hint
One cmdlet is newer and more powerful with advanced filtering.
✗ Incorrect
Get-WinEvent is the newer cmdlet that supports both classic and newer event logs with XML queries. Get-EventLog is older and limited to classic logs.