- July 27, 2023: fixed order of operations to remove quotas before applying new
- July 14, 2023: added logic to ignore quota rule if equal to 0
- July 14, 2023: added ability to specify protocol when creating test volume (smb/cifs/nfs)
You can use this tool, Migrate-ANFquota.ps1, to migrate Azure NetApp Files default user and group quotas.
It is recommended to use this tool from Azure Cloud Shell as the required PowerShell modules and other dependencies are already present.
Each time this script is executed a new log file will be created in the format: YYYYMMDDHHMMSSquota.log
git clone https://github.com/ANFTechTeam/Migrate-ANFquota.git
Install-Module Az.NetAppFiles
Set-AzContext -SubscriptionId <subscription ID>
./Migrate-ANFquota.ps1 -action list
./Migrate-ANFquota.ps1 -action migrate
./Migrate-ANFquota.ps1 -action migrate -resourceId <volume resource Id>
Note: The resource Id specified in the following step is the resource Id of the volume you want to create.
For example, if you want to create a new volume with the name 'newVolume' in capacity pool 'myCapacityPool' within the NetApp account 'myAccount' in resource group 'contoso.rg', the resource Id would be as follows:
/subscriptions/12345678-90ab-cdef-ghij-123456789abc/resourceGroups/contoso.rg/providers/Microsoft.NetApp/netAppAccounts/myAccount/capacityPools/myCapacityPool/volumes/newVolume
./Migrate-ANFquota.ps1 -action create -protocol smb|cifs|nfs -resourceId <volume resource Id> -location <region for new volume> -subnetResourceId <existing delegated subnet Resource Id>