Get-AlarmDefinition | New-AlarmAction -Email -To ‘email@example.com’ -CC @(‘firstname.lastname@example.org’, ‘email@example.com’) -Body ‘Test body’ -Subject ‘Test subject’
Drop that line into a PowerCLI windows and poof all alarms will be updated to send an email when they go off (change warning (yellow) to alarm (red)).
Sweet. Not to mention about time!
Don’t forget to add the SMTP server to your vCenter Server Settings and your vCenter server to your “allowed relay” list on your SMTP server.