Users may wish to configure a single email address to receive all alerts generated by vCenter Server without manually editing every individual alarm definition.
vCenter Server currently does not support a "Global Subscriber" setting. Email notification recipients need to be configured at the action level within each specific alarm definition.
There is no global setting for alarm emails.
Configure Mail Server Settings: Ensure vCenter has valid SMTP settings to send emails.
As a workaround, use the below PowerShell script to update the email address for all alarms.
Best practice: Use an Email Distribution List to avoid updating vCenter alarms every time a recipient change is needed.
# 1. Connect to your vCenter Server
Connect-VIServer -Server "vcenter.domain.local" -User "[email protected]" -Password "<password>"
# 2. Define the recipient email address
$emailAddress = "[email protected]"
# 3. Retrieve all alarm definitions
$alarms = Get-AlarmDefinition
# 4. Loop through all alarms and add the email action
foreach ($alarm in $alarms) {
# Check if an email action already exists to avoid duplicate entries
$existingAction = Get-AlarmAction -AlarmDefinition $alarm -ActionType SendEmail -ErrorAction SilentlyContinue
if (-not $existingAction) {
Write-Host "Adding email action to: $($alarm.Name)"
# Add the email action
$action = New-AlarmAction -AlarmDefinition $alarm -Email -To $emailAddress
# Optional: Define exactly when it triggers (e.g., only when changing from Yellow to Red)
# New-AlarmActionTrigger -AlarmAction $action -StartStatus "Yellow" -EndStatus "Red" | Out-Null
} else {
Write-Host "Email action already exists for: $($alarm.Name)"
}
}
# 5. Disconnect from vCenter
Disconnect-VIServer -Confirm:$false