Subscription1 includes a Log Analytics workspace named Workspace1. To view error events from the Event table, which query should you run in Workspace1?
Choose an answer
Tap an option to check your answer.
Correct answer: Event | search "error".
Why this is the answer
The correct query for Log Analytics is Event | search "error". This Kusto Query Language (KQL) syntax pipes the Event table to the search operator, which efficiently finds records containing the string "error" in any searchable column. The option select from Event where EventType == "error" uses SQL-like syntax, which is not valid KQL. Event | where EventType is "error" is closer to KQL but uses is instead of == for comparison and assumes an EventType column, whereas search is more general. Get-Event Event | where {$.EventType == "error"} uses PowerShell syntax, not KQL, and is incorrect for Log Analytics.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed