100% Latest & Updated Microsoft AZ-104 Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
Question 790
A storage account exports Blob service logs to a Log Analytics workspace. The audit team asks to increase the searchable retention period from 30 to 180 days. An engineer proposes changing the diagnostic setting alone. What configuration should be examined?
- Select more diagnostic log categories without changing the destination retention
- Change only the diagnostic setting's display name
- Increase diagnostic data-ingestion volume to keep older records searchable
- Adjust the applicable Log Analytics table or workspace retention setting in the destination
Explanation
Correct Answer
D:Diagnostic settings route telemetry to sinks; retention and lifecycle within Log Analytics are governed by the destination's retention settings, not just by whether the resource sends logs.
Incorrect Answers
A:Choosing additional categories changes data volume, not how long previously ingested rows remain available inside Log Analytics.
B:Renaming the route does not extend the lifetime of log data held by the workspace.
C:Ingesting more events cannot extend the retention period for prior log records. The destination table lifecycle must be adjusted.
Question 791
Administrators need Azure subscription activity logs available for a compliance investigation more than 90 days after the events occurred. No external export was configured at the time. What retention limitation should they plan for going forward?
- Export Activity Log events to a supported long-term destination before the default retention expires
- Change the source Azure Activity Log severity filter and assume older events become retained
- Increase an existing VM diagnostic extension log retention but do not export subscription Activity Log
- A Network Security Group inbound allow rule preserves old Activity Log events
Explanation
Correct Answer
A:Azure Activity Log has a limited native retention period. Diagnostic export to Log Analytics, Storage or Event Hubs can support longer retention when correctly configured in advance.
Incorrect Answers
B:Severity filtering changes which events may be selected for display or export; it does not extend native retention of historical entries.
C:Guest VM telemetry and subscription management-plane Activity Log are distinct sources with separate retention configuration.
D:Packet filtering rules do not change data retention for Azure management event records.
Question 792
A Key Vault already sends audit logs to one Log Analytics workspace. Compliance wants the same categories delivered to a second Log Analytics workspace, without stopping the first stream. An engineer attempts to select two workspaces in one diagnostic setting. What should be done?
- Configure an Event Hubs destination and treat it as an additional Log Analytics workspace
- Create a second diagnostic setting on the resource for the other Log Analytics destination
- Enter both workspace IDs as a comma-separated value in the existing destination field
- Replace the first workspace with the second and assume the original continues to receive logs
Explanation
Correct Answer
B:Each diagnostic setting supports at most one destination of each type. A separate setting can send the chosen categories to another Log Analytics workspace, subject to resource limits.
Incorrect Answers
A:Event Hubs is a streaming destination type, not a second Log Analytics workspace for queries. The requested second workspace needs a separate diagnostic setting.
C:The destination field does not support two workspace identifiers in one setting. It represents one configured Log Analytics destination.
D:Replacing the original destination would stop forwarding by that setting to the original workspace; it does not clone logs into both.
Question 793
An administrator configures resource diagnostic logs from an Azure service hosted in West Europe into a new Event Hubs namespace in North Europe. The diagnostic setting rejects the destination despite valid RBAC rights. What documented constraint is relevant?
- Grant the Event Hubs namespace a public IP and assume that removes the regional diagnostic-setting destination limitation
- Move the Event Hubs namespace into the monitored resource's resource group while leaving its North Europe region unchanged
- For a regional monitored resource, the Event Hubs or Storage destination must be in the same region
- Assign a cross-subscription Event Hubs Send role and assume authorization removes the North Europe versus West Europe location restriction
Explanation
Correct Answer
C:Azure Monitor requires region alignment for Event Hubs and Storage diagnostic destinations of regional resources. Moving the sink to a supported same-region destination resolves this specific restriction.
Incorrect Answers
A:Internet accessibility is not the issue: for a regional monitored resource, a regional Event Hubs destination must satisfy the documented same-region condition. A public IP cannot waive that rule.
B:Resource-group membership does not satisfy the same-region destination requirement for regional service diagnostics. The destination must be hosted in the required region, independent of group name.
D:RBAC permission to send to Event Hubs doesn't relax Azure Monitor diagnostic-setting destination requirements. For a regional monitored resource, the Event Hubs destination must be in the same region even when the namespaces are in accessible subscriptions.
Question 794
An operator is analyzing a populated Azure Monitor Logs table named AzureActivity. The requirement is a count of matching events per subscription over the last 24 hours, not a raw list of every event. Which KQL operator is needed to calculate the grouped counts?
- summarize count() by SubscriptionId
- project SubscriptionId without aggregation
- sort by SubscriptionId asc only
- take 100
Explanation
Correct Answer
A:The summarize operator aggregates rows and can group the count by SubscriptionId. With an appropriate time filter, the query yields the requested per-subscription totals rather than raw events.
Incorrect Answers
B:Project selects columns but preserves one output row for each matching event. It does not calculate grouped totals and can return many duplicate subscription IDs.
C:Sorting rearranges events by subscription identifier but still leaves individual records unaggregated. No per-subscription event counts are calculated.
D:Take limits the number of returned records and may omit events. It cannot produce accurate counts across the last 24 hours.
Question 795
A Log Analytics query against AzureActivity contains millions of historical events. A compliance report requires only administrative events from the most recent 48 hours before the result is grouped and counted. What should the query do?
- Filter AzureActivity with `TimeGenerated >= ago(48h)` and `CategoryValue =~ "Administrative"` before `summarize`
- Use project to rename every column without filtering time
- Use sort by SubscriptionId but do not restrict event timestamps
- Use take 100 and assume the first 100 rows represent the latest 48 hours
Explanation
Correct Answer
A:The report has two independent restrictions: time within the most recent 48 hours and the Administrative event category. Apply both where predicates before summarize (for example `AzureActivity | where TimeGenerated >= ago(48h) and CategoryValue =~ "Administrative" | summarize count() by SubscriptionId`). A time filter alone would incorrectly count Policy, Security, and other categories. Case-insensitive category matching avoids case-related omissions.
Incorrect Answers
B:Project selects or renames output fields, not the time window. Historical events would still contribute to aggregate counts.
C:Sorting changes order without excluding older rows. It cannot enforce a 48-hour compliance-report boundary.
D:Take is a sample/limit operation with no guaranteed complete coverage of the required interval. It is unsuitable for accurate time-scoped aggregation.
Question 796
An operations analyst has a Log Analytics table with TimeGenerated and wants the count of matching error events in successive one-hour periods. Which KQL operation produces this aggregation after the desired filter?
- take 1 to represent the total hourly error volume
- order by TimeGenerated descending and label each result an hourly summary
- summarize count() by bin(TimeGenerated, 1h)
- project TimeGenerated, then assume the remaining rows are hourly counts
Explanation
Correct Answer
C:The summarize operator aggregates rows, and bin groups timestamps into hourly buckets. Together they return one count per period rather than individual event rows.
Incorrect Answers
A:Take returns a subset of rows and is not a reliable count or time bucket calculation.
B:Sorting preserves one row per event. It does not count errors per hour and therefore cannot produce the requested aggregate.
D:Project selects columns but does not aggregate rows or assign events to one-hour bins. Individual events remain uncounted as groups.
Question 797
A workspace receives heartbeat events from hundreds of Azure VMs. A help desk query must count recent heartbeat records for VM named app-17 only, not the whole fleet. Which KQL pattern is needed?
- Summarize Heartbeat by Computer for every VM and take the first returned computer without selecting app-17
- Filter Heartbeat by the resource group only and count all its VM records as though they belonged to app-17
- Use a where filter on the Computer field and time interval before summarizing matches
- Filter Heartbeat only by TimeGenerated and summarize a total count without restricting the Computer field
Explanation
Correct Answer
C:Where reduces rows to the intended VM and period. A subsequent count then reflects that machine rather than an aggregate across all senders.
Incorrect Answers
A:A by-Computer aggregation can produce per-VM counts, but an arbitrary first row is not guaranteed to belong to app-17. The scenario demands an explicitly named VM, so filter to that Computer value and the time window before counting.
B:Filtering by resource group may still include several VMs, so its count can exceed the target VM heartbeat count. Use the Computer identifier and a recent TimeGenerated condition for the specific endpoint.
D:A time filter bounds the reporting interval but leaves heartbeat records from every monitored VM in the results. Without a Computer predicate or an exact post-group selection, the total is not specific to app-17.
Question 798
A Log Analytics query returns thousands of service failure events but the operator wants a quick estimated count of different computers that produced failures during the last day, not a row count. Which KQL aggregation is appropriate?
- Use summarize count() after filtering the last 24 hours
- Use summarize count() by Computer and count the original result without a second aggregation
- Use make_set(Computer) and report the number of input rows
- summarize dcount(Computer) after filtering the last 24 hours
Explanation
Correct Answer
D:dcount on Computer estimates the number of distinct computer values in the filtered event set. The TimeGenerated range should be filtered first to match the one-day scope.
Incorrect Answers
A:This produces the number of event rows, so repeated failures from one VM are counted multiple times instead of as one affected computer.
B:It produces per-computer event counts rather than the requested single distinct-computer total unless further processed.
C:A set can contain unique names, but reporting source row count still measures events rather than the cardinality of unique hosts.
Question 799
Operations has a table of approved VM names and separate Heartbeat records. It needs to identify approved VMs with no heartbeat in the last 30 minutes, not merely count heartbeats for active devices. Which query pattern best fits?
- Use a leftanti join from approved inventory to recent heartbeat computers
- Use an inner join between approved inventory and recent heartbeat
- Use a leftouter join and include every row without testing for missing heartbeat keys
- Start from the Heartbeat table and use a leftanti join against approved inventory
Explanation
Correct Answer
A:A leftanti join returns inventory-side keys with no matching recent heartbeat key, which is the actual missing-monitoring set rather than just an active-system report.
Incorrect Answers
B:An inner join returns computers that DO have heartbeat matches, the opposite of the absent-computer set needed for incident follow-up.
C:A leftouter result includes healthy systems too; an explicit null filter would still be necessary to isolate missing matches.
D:This finds reporting machines not listed in inventory, not inventoried computers that stopped producing heartbeat.
Question 800
A Log Analytics query returns one row per failure event with Computer, TimeGenerated, EventID, Result, TenantId and SourceSystem. A handoff report must retain every event row and all columns except TenantId and SourceSystem. Which KQL operator best performs this selective column removal?
- Use project TenantId, SourceSystem so the named fields are hidden
- Use summarize count() by Computer to suppress the two columns
- Use extend TenantId = "", SourceSystem = "" to remove their schema fields
- Use project-away TenantId, SourceSystem after the filtering step
Explanation
Correct Answer
D:Project-away excludes the named columns while retaining the other input columns and row count. Applied after any required filtering, it keeps Computer, TimeGenerated, EventID and Result intact while hiding TenantId and SourceSystem in the report output.
Incorrect Answers
A:The project operator selects only the named columns, so naming TenantId and SourceSystem would display exactly the fields the report must exclude. It would also omit needed event details such as EventID and TimeGenerated.
B:Summarize aggregates events into groups and changes row cardinality, violating the requirement to preserve one event row per original record. Aggregation is unnecessary for a column-level projection.
C:Extend adds or overwrites column expressions but keeps those fields present in the result, even if their values are blank. It does not remove their schema fields and may mislead consumers into thinking the original columns were never collected.
Microsoft Azure Administrator (AZ-104) Practice Tests