DP-900 Describe an analytics workload on Azure Practice Question
Exhibit
Refer to the exhibit.
$storageAccount = Get-AzStorageAccount -ResourceGroupName 'rg-analytics' -Name 'salesdatalake'
$ctx = $storageAccount.Context
$files = Get-AzStorageBlob -Container 'raw' -Context $ctx -Prefix 'sales/2023/'
$files | Where-Object {$_.LastModified -gt (Get-Date).AddDays(-7)}Refer to the exhibit. A data engineer runs the PowerShell script shown. What is the purpose of this script?
⚠ Common exam trap
The trap here is that candidates see `Get-AzStorageBlob` and assume it lists all blobs (option A), overlooking the `Where-Object` filter that restricts results to only recently modified blobs.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
List blobs modified in the last 7 days
The script uses `Get-AzStorageBlob` with the `-Prefix` parameter to filter blobs by name, then applies a `Where-Object` filter to select only blobs whose `LastModified` property is greater than or equal to 7 days ago. This effectively lists blobs modified in the last 7 days. The script does not perform any copy or delete operations, and it does not list all blobs without filtering.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
List all blobs in the container
Why it's wrong here
The cmdlet sequence uses the -Prefix parameter to limit the query to a specific virtual directory and then applies a Where-Object filter on the LastModified property, so the result is an intentionally scoped subset rather than every blob in the container. No unconditional enumeration of the entire container occurs; the prefix and date criteria cut the dataset down. Therefore, labeling it as a full container listing is inaccurate.
- ✗
Copy blobs to another container
Why it's wrong here
No storage copy cmdlet such as Copy-AzStorageBlob or Start-AzStorageBlobCopy appears in the script, and no destination container or storage context is specified. The pipeline only performs a read-based lookup of blob objects and filters their LastModified timestamps; copying would require an explicit write operation that transfers the source blob to a target. Thus this option describes a side effect that the script never triggers.
- ✓
List blobs modified in the last 7 days
Why this is correct
The script retrieves blobs under the given prefix and uses Where-Object to test whether each blob's LastModified property is greater than or equal to the date seven days ago, effectively returning only those changed in the last week. Get-Date generates the current timestamp, and AddDays(-7) computes the cutoff boundary. Blobs with older LastModified values are excluded, making this a targeted inventory of recently modified blobs.
- ✗
Delete old blobs from the container
Why it's wrong here
No deletion cmdlet such as Remove-AzStorageBlob is invoked, and the script does not pass the filtered results to any pipeline command that could remove them. Even though the script could identify old blobs if the date condition were inverted, it never acts on that data destructively and no snapshot or lease handling appears. Therefore, the script is purely read-only and cannot delete anything.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DP-900 question from scratch — 820 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DP-900 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DP-900 exam.