az-104 Practice Question 707

Exam: az-104
Domain: Describe Azure management and governance
Topic: Describe monitoring tools in Azure
Difficulty: medium
You have an Azure subscription named Subscription1 that contains an Azure Log Analytics workspace named Workspace1.\nYou need to view the error events from a table named Event.\nWhich query should you run in Workspace1?

Answer Options

A
Get-Event Event | where {$_.EventType == ""error""}
B
search in (Event) ""error""
C
select * from Event where EventType == ""error""
D
search in (Event) * | where EventType -eq ""error""

Correct Answer

B: search in (Event) ""error""

Explanation

To search a term in a specific table, add the table-name just after the search operator\nNote:\nThere are several versions of this question in the exam. The question has two possible correct answers:\n1. Event | search ""error""\n2. Event | where EventType == ""error""\n3. search in (Event) ""error""\nOther incorrect answer options you may see on the exam include the following:\n1. Get-Event Event | where {$_.EventTye -eq ""error""}\n2. Event | where EventType is ""error""\n3. search in (Event) * | where EventType -eq ""error""\n4. select * from Event where EventType is ""error""