Remediation
From Azure Portal
- Go to
Storage accounts. - Click the name of a storage account with Blob Storage.
- In the
Overviewpage, on thePropertiestab, underBlob service, clickDisablednext toVersioning. - Under
Tracking, check the box next toEnable versioning for blobs. - Select the radio button next to
Keep all versions or Delete versions after (in days). - If selecting to delete versions, enter the number of days after which to delete blob versions.
- Click
Save. - Repeat steps 1-7 for each storage account with blob storage.
From Azure CLI
For each storage account requiring remediation, run the following command to enable blob versioning:
az storage account blob-service-properties update \
--account-name {{storage-account-name}} \
--enable-versioning true
From PowerShell
For each storage account requiring remediation, run the following command to enable blob versioning:
Update-AzStorageBlobServiceProperty `
-ResourceGroupName {{resource-group-name}} `
-StorageAccountName {{storage-account-name}} `
-IsVersioningEnabled $true