vSphere5: My favorite feature

Get-AlarmDefinition | New-AlarmAction -Email -To ‘jandrews@inflexionllc.com’ -CC @(‘test1@inflexionllc.com’, ‘test2@inflexionllc.com.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.

This entry was posted in Computing, PowerShell, Scripting, Virtualization, VMware and tagged , , , , . Bookmark the permalink.

2 Responses to vSphere5: My favorite feature

    Leave a Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.