diff --git a/Pinja.Azure.Alerts/Set-AlertRulesLogicAppReceiver.ps1 b/Pinja.Azure.Alerts/Set-AlertRulesLogicAppReceiver.ps1 index 1a1130f..3f7fff7 100644 --- a/Pinja.Azure.Alerts/Set-AlertRulesLogicAppReceiver.ps1 +++ b/Pinja.Azure.Alerts/Set-AlertRulesLogicAppReceiver.ps1 @@ -116,7 +116,7 @@ function Set-AlertRulesLogicAppReceiver { if ($PSCmdlet.ShouldProcess($ResourceGroup, "Update-AzActionGroug - azure-alerts")) { - if (Get-AzActionGroup -Name "azure-alerts" -ResourceGroup $ResourceGroup) { + if (Get-AzActionGroup -Name "azure-alerts" -ResourceGroup $ResourceGroup -ErrorAction SilentlyContinue) { $alertRef = Update-AzActionGroup ` -Name "azure-alerts" ` -ResourceGroup $ResourceGroup `