AZ-204 Develop for Azure storage Practice Question
Exhibit
Name : stg1
ResourceGroupName : rg1
Location : eastus
SkuName : Standard_GRS
Kind : StorageV2
AccessTier : Cool
Encryption : {"services":{"blob":{"enabled":true,"lastEnabledTime":"2025-01-01T00:00:00Z"},"file":{"enabled":true,"lastEnabledTime":"2025-01-01T00:00:00Z"}},"keySource":"Microsoft.Storage"}Refer to the exhibit. You run the Get-AzStorageAccount cmdlet and see the output above. You need to enable the hierarchical namespace feature for this storage account. What should you do first?
⚠ Common exam trap
It's easy for candidates to assume `-EnableHierarchicalNamespace` is a settable property like `-AccessTier` or `-SkuName`, but Azure enforces it as a creation-only flag, making deletion and recreation the only path.
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
✓
Delete the storage account and create a new one with -EnableHierarchicalNamespace $true.
The hierarchical namespace feature (which enables Azure Data Lake Storage Gen2) cannot be enabled on an existing storage account; it must be set at creation time. Therefore, you must delete the current account and create a new one with the `-EnableHierarchicalNamespace $true` parameter. Option D is correct because it follows this immutable requirement.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Change the replication to LRS.
Why it's wrong here
Replication types like Locally Redundant Storage (LRS), Geo-Redundant Storage (GRS), and Zone-Redundant Storage (ZRS) dictate the redundancy and geographic distribution of data within an Azure storage account. This feature operates independently of the Hierarchical Namespace (HNS), which is a structural property enabling file system semantics. Changing the replication strategy only affects data durability and availability, not the underlying data organization or the ability to manage directories and file-level Access Control Lists (ACLs). Therefore, modifying the replication setting will not enable HNS.
- ✗
Set the -EnableHierarchicalNamespace parameter to true on the existing account.
Why it's wrong here
The Hierarchical Namespace (HNS) is a fundamental architectural feature of Azure Data Lake Storage Gen2 that must be enabled at the time of storage account creation. It involves specific metadata structures and indexing mechanisms that cannot be retroactively applied to a standard blob storage account without significant data re-organization. Attempting to enable HNS on an existing account would fundamentally alter its data management model, which is not supported by Azure's storage platform due to the complexity of modifying core structural properties post-provisioning.
- ✗
Change the access tier to Hot.
Why it's wrong here
Access tiers such as Hot, Cool, and Archive are primarily cost optimization settings that determine the pricing for storage and data access based on expected usage patterns. These tiers influence data access latency and transaction costs but have no bearing on the structural capabilities of the storage account, such as the presence or absence of a Hierarchical Namespace. Therefore, modifying the access tier will not enable or disable HNS functionality, as they address entirely different aspects of storage account configuration.
- ✓
Delete the storage account and create a new one with -EnableHierarchicalNamespace $true.
Why this is correct
Enabling the Hierarchical Namespace (HNS) is a foundational configuration that dictates how data is organized and accessed within an Azure storage account, providing file system semantics essential for Azure Data Lake Storage Gen2. Since this property cannot be altered after an account has been provisioned, the only method to achieve HNS functionality is to delete the existing storage account. Subsequently, a brand new one must be created, explicitly specifying the `-EnableHierarchicalNamespace $true` parameter during its creation, which inherently requires migrating any data from the old account to the new one.
Go deeper
Related to this question
About these practice questions
One of 881 original AZ-204 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-204 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 AZ-204 exam.