Bird
0
0

What will be the output of this command?

medium📝 Command Output Q4 of 15
PowerShell - System Administration
What will be the output of this command?
Get-EventLog -LogName Application -EntryType Error -Newest 3 | Select-Object -Property TimeGenerated, Message
AAll entries from the Application log with error type
BThe 3 most recent error entries from the Application log showing time and message
CThe 3 oldest entries from the Application log
DAn error because -EntryType cannot be combined with -Newest
Step-by-Step Solution
Solution:
  1. Step 1: Analyze command filters

    The command filters Application log entries to only those with EntryType 'Error' and limits to the newest 3 entries.
  2. Step 2: Understand output selection

    Select-Object picks only the TimeGenerated and Message properties for display.
  3. Final Answer:

    The 3 most recent error entries from the Application log showing time and message -> Option B
  4. Quick Check:

    Filter + limit + select = recent 3 errors with time and message [OK]
Quick Trick: Combine -EntryType and -Newest to filter recent errors [OK]
Common Mistakes:
  • Thinking it returns all errors instead of 3 newest
  • Assuming it returns oldest entries
  • Believing the command causes an error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes