Add e-mail alerts to all 41 default vSphere 4.1 alarms


Towards the end of a customer’s virtualization implementation we’re doing some clean-up of the environment. During the initial setup I was using my own local email address to test various alerting processes, of which there are several. For instance, every SQL Server maintenance task sends a success/failure e-mail alert, the NetApp Virtual Storage Console plug-in can be configured to e-mail an administrator after snapshots are taken, and the Dell iDRAC can send e-mails on hardware status changes. All those are fairly quick to configure or lack a way to script a quick solution. But with 40 default alarms in vSphere, three vCenters, and being lazy as I am, I knew there must be a better solution than right clicking 120 alarms and copying-and-pasting an email address. As the proverb goes, if you repeat it, script it. So I set out to find how PowerCLI could help me.

Keep reading