Reputation: 41
Hi,
Can anyone explain the difference between Enable-AzStorageDeleteRetentionPolicy
and Enable-AzStorageBlobDeleteRetentionPolicy
?
I am working on a PowerShell script to automate creation of storage accounts amongst other processes. During my research, I realized that these two options exist. However, the difference is not clear from the Microsoft documentation. Both have the description "... enables delete retention policy for the Azure Storage Blob service**."
For the first cmdlet: https://learn.microsoft.com/en-us/powershell/module/az.storage/enable-azstoragedeleteretentionpolicy?view=azps-6.2.0
For the second cmdlet: https://learn.microsoft.com/en-us/powershell/module/az.storage/enable-azstorageblobdeleteretentionpolicy?view=azps-6.2.0
Upvotes: 2
Views: 839
Reputation: 136196
Great question! Based on the documentation and examples here
, while both Cmdlets do the same thing (i.e. manage blob soft-delete settings) there is one subtle difference:
Enable-AzStorageDeleteRetentionPolicy
is used for storage accounts with hierarchical namespaces enabled (i.e. your Azure Data Lake Gen 2 Storage accounts) while Enable-AzStorageBlobDeleteRetentionPolicy
is for your regular storage accounts where hierarchical namespace is not enabled.
Upvotes: 3