Monitor Azure file shares based on percentage used

This time a simple blog about monitoring all your Azure storage file shares within the organization tenant.
It will check storage used and compare it with the configured quota. An email will be sent when the threshold limit based on percentage is exceeded. I already had something created for this, but it was using all kind of deprecated AZ PowerShell-cmdlets. I rewrote it to make only use of API’s to get all the necessary information and make it more future-proof.
It’s a PowerShell script that can be run as a runbook in Azure Automation Accounts, but also for example as pipeline by changing the variables. The service principal used needs to have atleast reader permission on all subscriptions you want to check.
Storage threshold exceeded email
When the threshold is met, in this case 80%, an email will be sent to inform you with the Azure file share name, subscription, id, location, quota, usage and percentage used.
Feel free to use it for your own needs and reach out when you have some questions!


