Application Insights Managed with Azure Powershell

August 1, 2020
azure application-insights

AI in AZ

Sets the Daily Cap for an Application Insights resource to a value

 

Set-Variable "rg" "group name"

Set-Variable "cap" .5

Get-AzApplicationInsights | Where-Object {$_.ResourceGroupName -eq $rg} | ForEach-Object {Set-AzApplicationInsightsDailyCap -ResourceGroupName $_.ResourceGroupName -Name $_.Name -DailyCapGb $cap}

 

Get-AzApplicationInsights | Where-Object {$_.ResourceGroupName -ne $rg} | ForEach-Object {Set-AzApplicationInsightsDailyCap -ResourceGroupName $_.ResourceGroupName -Name $_.Name -DailyCapGb $cap}