This post was last updated on September 16th, 2013 at 10:28 pm
Get-AlarmDefinition | New-AlarmAction -Email -To ‘firstname.lastname@example.org’ -CC @(‘email@example.com’, ‘firstname.lastname@example.org’) -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.