VMware Cloud Community
T180985
Expert
Expert

List vCenter alarms that are set to email out

Im sure this is going to be a super easy one to fix but its driving me a little crazy... seems there are hundreds of blogs on how to setup email alerts but no one can tell me how to list them. Best i have come up with is:

PS H:\> Get-AlarmDefinition | Get-AlarmAction -ActionType SendEmail

ActionType      Trigger
----------      -------
SendEmail       {...
SendEmail       {...
SendEmail       {...
SendEmail       {...

pretty useless.... Can someone tell me how i can get a list of the Alarm Definition Name, ActionType (Email) & Trigger? Thanks!!!

Please mark helpful or correct if my answer resolved your issue. How to post effectively on VMTN https://communities.vmware.com/people/daphnissov/blog/2018/12/05/how-to-ask-for-help-on-tech-forums
0 Kudos
2 Replies
T180985
Expert
Expert

Infact i just exported it to csv and it gave me what i wanted :smileycry:

Please mark helpful or correct if my answer resolved your issue. How to post effectively on VMTN https://communities.vmware.com/people/daphnissov/blog/2018/12/05/how-to-ask-for-help-on-tech-forums
0 Kudos
Ashokkumar-G
Contributor
Contributor

Use the below command its working fine.

 

Get-AlarmDefinition | Get-AlarmAction -ActionType SendEmail | Select AlarmDefinition, To, @{Name="Trigger";e={$_.Trigger -join ", "}}
 
0 Kudos