A PowerShell script to check and optionally remediate capacity issues with Azure NetApp Files volumes.
3/24/2021 - Adding instructions to run against all Azure subscriptions (see below)
Install-Module -Name Az.NetAppFiles -AllowClobber -Force
git clone https://github.com/ANFTechTeam/ANFCapacityReport.git
cd ANFCapacityReport
./ANFCapacityReport.ps1
./ANFCapacityReport.ps1 -IgnoreFailedVolumes
./ANFCapacityReport.ps1 -PercentFullThreshold 75
./ANFCapacityReport.ps1 -Remediate
Run the script in remediate mode and automatically answer 'yes' to all resize prompts (non-interactive mode)
./ANFCapacityReport.ps1 -Remediate -Yes
./ANFCapacityReport.ps1 -IgnoreFailedVolumes -PercentFullThreshold 75 -Remediate -Yes
foreach($sub in Get-AzSubscription) { Set-AzContext $sub; ./ANFCapacityReport.ps1 -IgnoreFailedVolumes -PercentFullThreshold 75 }