You need a single query that lists all Arc-enabled servers missing the Azure Monitor Agent extension and shows the compliance status of any Guest Configuration assignments on those servers. Which Azure Resource Graph query should you use?
Choose an answer
Tap an option to check your answer.
Correct answer: resources | where type =~ 'microsoft.hybridcompute/machines' | project id, name, resourceGroup, location | join kind=leftanti (resources | where type =~ 'microsoft.hybridcompute/machines/extensions' and name in~('AzureMonitorWindowsAgent','AzureMonitorLinuxAgent') | project machineId = tostring(split(id, '/extensions/')[0])) on $left.id == $right.machineId | join kind=leftouter (resources | where type =~ 'microsoft.guestconfiguration/guestconfigurationassignments' | project machineId = tostring(split(id, '/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/')[0]), assignmentName = name, compliance = tostring(properties.complianceStatus)) on $left.id == $right.machineId.
Why this is the answer
The correct query identifies Arc-enabled servers (microsoft.hybridcompute/machines), then uses a leftanti join to filter for those missing the Azure Monitor Agent extensions (AzureMonitorWindowsAgent or AzureMonitorLinuxAgent). Finally, a leftouter join brings in Guest Configuration assignment compliance status (microsoft.guestconfiguration/guestconfigurationassignments), ensuring that even servers without assignments are included (with null compliance). Incorrect options: The query referencing microsoft.compute/virtualmachines is for Azure VMs, not Arc-enabled servers. The query filtering for MMA (Microsoft Monitoring Agent) is outdated as AMA is the current agent, and it incorrectly joins with microsoft.compute/virtualmachines. The query for microsoft.operationalinsights/workspaces lists Log Analytics workspaces, not Arc-enabled servers or their compliance.
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