How to create a PS/CLI script for file share capacity alert with Action group

Swa1209 90 Reputation points
2024-07-04T10:14:43.54+00:00

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?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,661 questions
Windows for business | Windows Server | User experience | PowerShell
Developer technologies | .NET | .NET CLI
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 47,901 Reputation points
    2024-07-05T15:47:27.8666667+00:00

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.