Forum Discussion

GouravIN's avatar
GouravIN
Brass Contributor
Dec 09, 2018
Solved

New V2 alert from PowerShell

Hi All,   I want to create alert using PowerShell and could certainly do this however I have three questions: -   1- When I am using "Add-AzureRmMetricAlertRule" CMDlet to create alerts they are ...
  • snehith's avatar
    snehith
    Dec 10, 2018

    Hi Gourav,

     

    The cmdlet you are using is for classic metric alerts in Azure Monitor. Classic metric alerts didn't support action groups and used a custom notification mechanism. 

    We don't yet have PowerShell cmdlets for newer metric alerts. We are actively working on those and will provide an announcement once they are ready. 

     

    In the meanwhile, if you are trying to create metric alerts, you can use Azure CLI to automate creating alerts. You can also create action groups through CLI as well. 

     

     

    If you trying to create log alerts based on Kusto queries, today the only way to automate it is through ARM templates. The PS cmdlets and CLI are being worked  on, but are not available yet.

     

    Regards,
    Snehith

     

     

Resources