I think the New-AzMetricAlertRuleV2 cmdlet is what you're looking for. If you need to work with "classic" alerts, the Add-AzMetricAlertRule might be what you want.
How to create a PS/CLI script for file share capacity alert with Action group
Sutheswaran, Suwhathi
70
Reputation points
I want to create an alert for file capacity of files and I need an action group as well.
Problem is that the storage account has 90 files and i need for each fileshare 1 Alert.
I want to try using a script to avoid taking a lot of time doing it manually.
Can someone help me with this?