Remediation
From Azure Portalβ
- Go to
Storage accounts
. - For each storage account with file shares, under
Data storage
, clickFile shares
. - Under
File share settings
, click the value next toSoft delete
. - Under
Soft delete for all file shares
, click the toggle to set it toEnabled
. - Under
Retention policies
, set an appropriate number of days to retain soft deleted data between 1 and 365, inclusive. - Click
Save
.
From Azure CLIβ
For each storage account requiring remediation, run the following command to enable soft delete for file shares and set an appropriate number of days for deleted data to be retained, between 1 and 365, inclusive:
az storage account file-service-properties update --account-name <storage-account> --enable-delete-retention true --delete-retention-days <retention-days>
From PowerShellβ
For each storage account requiring remediation, run the following command to enable soft delete for file shares and set an appropriate number of days for deleted data to be retained, between 1 and 365, inclusive:
Update-AzStorageFileServiceProperty -ResourceGroupName <resource-group> -AccountName <storage-account> -EnableShareDeleteRetentionPolicy $true -ShareRetentionDays <retention-days>