Forum Discussion
SarthakChatterjee
Aug 10, 2019Copper Contributor
Fetch Log Analytics workspace alerts types configured in a csv using powershell
Hello, I want to create a Powershell script to find the current configured alerts in a Azure subscription and save the data in a csv file. I am interested to get the "Alert Types" in my results f...
CliveWatson
Aug 12, 2019Former Employee
https://azure.microsoft.com/en-gb/updates/now-available-powershell-cmdlets-for-azure-monitor-metric-and-log-alerts/ sepcifically https://docs.microsoft.com/en-gb/powershell/module/az.monitor/get-azscheduledqueryrule?view=azps-2.5.0#code-try-3
Get-AzScheduledQueryRule -ResourceGroupName "fabrikamltdprod" | where {$_.Type}
https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-log
SarthakChatterjee
Aug 13, 2019Copper Contributor
I can see OperationalInsights having some cmdlets to cater to Log Analytics workspace for AzureRm module but not exactly able to pinpoint the cmdlet to use to fetch the alert types configured for a subscription.CliveWatson
https://docs.microsoft.com/en-us/powershell/module/azurerm.operationalinsights/?view=azurermps-6.13.0#operational_insights