Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azuremonitoring.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ foreach ($rule in $alertRules) {
}
catch {
# If the resource does not exist, delete the alert rule
Write-Warning "Resource $resourceId does not exist. Deleting alert rule $($rule.Name)..." -ForegroundColor Red -BackgroundColor Black
Write-Warning "Resource $resourceId does not exist. Deleting alert rule $($rule.Name)..."
Remove-AzMetricAlertRuleV2 -ResourceGroupName $rule.resourceGroup -Name $rule.Name
Write-Output "Alert rule $($rule.Name) deleted successfully." -ForegroundColor Yellow -BackgroundColor Black
}
Expand Down