An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
Use on your own risk!
This script is not tested!
Import-Module Az
$tenantId = '<your Azure Tenant ID>'
$emailAddress = '******@test.org'
Connect-AzAccount -Tenant $tenantId
$subs = Get-AzSubscription
Foreach ($sub in $subs)
{
select-AzSubscription $sub | Out-Null
$subName = $sub.Name
$rsvs = Get-AzRecoveryServicesVault
foreach ($rsv in $rsvs)
{
$rsvName = $rsv.Name
$rsvRg = $rsv.resourceGroupName
Write-Host "Subscription = $subName`r`nRSVname = $rsvName`r`nRG = $rsvRG"
Set-AzRecoveryServicesAsrVaultContext -Vault $rsv | Out-Null
Set-AzRecoveryServicesAsrAlertSetting -CustomEmailAddress $emailAddress -LocaleID "en-us" -EnableEmailSubscriptionOwner | Out-Null
}
}
After some more searching I found these two:
https://techcommunity.microsoft.com/t5/azure/recovery-services-vault-backup-alerts-configure-notifications/m-p/1208466
https://feedback.azure.com/forums/258995-azure-backup/suggestions/39877798-configure-notifications-for-backup-alerts-in-recov
It might be that Azure Backup Alert Notifications can't be configured via PowerShell today.
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten