Modify VMware vCenter 5.5 Alarm Notifications using PowerCLI

Configuring or modifying alarm notifications on vCenter can be time consuming because there are more than 80 pre-defined alarms (in vCenter 5.5) which need to be modified; and the point is that it’s not possible to apply a single change to all of them or a group of them at once. Via GUI (web client or native) alarms should be modified one by one. So, imagine that you want to add an email as recipient of some alarms, let’s say the ones which send email notification when status is changed from Yellow to Red and Yellow to Green. It’s difficult to go through all the alarms, find them and apply your changes. This kind of change is very common when a new administrator is added to the team or someone leaves.

It is one of the situations where using PowerCLI is really beneficial. You can customize and group the alarms as you want, change the variables whenever needed and run the script using PowerCLI. I found this template by Lauren Malhoit very useful but it was not compatible with vSphere 5.5. I modified the script for vSphere vCenter 5.5 and you can download it here. Using this script is easy by modifying email addresses and you can also change the groups (I mean for example adding to YRYG alarms) as you desired.


7 thoughts on “Modify VMware vCenter 5.5 Alarm Notifications using PowerCLI

  1. Mehdi,
    I’m new to powercli, but have desperately been trying to configure alarms in vcenter to send out email notifications.
    Using this script sounds like a great idea, but I am unsure where to run it and what exactly it will provide.
    Will running this script update all the the alarm notifications with email addresses all at once?

    • William,
      Yes, this script will update all the alarm notifications which are pre-defined by VMware all at once. You can run this script in PowerCLI which may have been already installed on your vCenter (is it an appliance or Windows server?). You can also install PowerCLI in another Windows machine with network access to vCenter. Also, attention to your vCenter version. If it’s 5.5 you can use my script. If it’s 5.0 or 5.1 use the other link in my post.

  2. Thanks for the modifications. What are all of these errors. It appears to state that the Alarm definition doesn’t exist. Do you have any input on this issues?

Leave a Reply to pickettsproblems Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s