Fetch Log Analytics workspace alerts types configured in a csv using powershell

Copper Contributor

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 for all the VM's for which Alerts are configured using Log Analytics workspac

6 Replies

Can you give me any alias for this command in AzureRm modules? i don't have permission to install Az.Monitor in our central instance where i need to test this. Have AzureRm modules installed there already. 

Hi Clive, Would it be possible for you to tell me the alias command for this in AzureRm modules as i have that presently installed in my server where i need to configure this?

@CliveWatson 

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....

Can anyone please help me with this?