Hi guys,
I'd like to send an email to the person who creates a VM in Vsphere. We're currently running on 5.5.
We have a security group in AD which allows administrative access to the Webconsole. I'd like to send an email to the admins when they create a VM to remind them of certain actions that he or she has to take. I thought about setting up a custom alarm to do this, because I couldn't find a predefined one. In the alarm i'm able to send a notification email, but this email doesn't include the text (reminders especially for our environment) I require. Is there another way of setting this up, for instance through "Run a command" and then point to a script? Have any of you experimented with this or is there an easier solution that I overlooked?
Thanks!
KR,
Kim
Hi guys,
I'd like to send an email to the person who creates a VM in Vsphere. We're currently running on 5.5.
We have a security group in AD which allows administrative access to the Webconsole. I'd like to send an email to the admins when they create a VM to remind them of certain actions that he or she has to take. I thought about setting up a custom alarm to do this, because I couldn't find a predefined one. In the alarm i'm able to send a notification email, but this email doesn't include the text (reminders especially for our environment) I require. Is there another way of setting this up, for instance through "Run a command" and then point to a script? Have any of you experimented with this or is there an easier solution that I overlooked?
Thanks!
KR,
Kim
Hi
As you said you can use "Run a command" to run batch file or you can use PowerCLI which is powerful tool for automation and management. You can use this link to make your own script based on PowerCLI.
Best Regards
Hi Yahya,
You suggest to make a script to send an email to the creator of a VM with the necessary notification stuff and add this to an alarm when a VM is created?
Because the script below does not provide that functionality
thanks.
Hi
I am sure you can create a customize alarm with own message using PowerCLI and based on VMware documents also you can utilize bath file (.bat file) to run when trigger occurred.
I prefer to use PowerCLI to create my customize alarm email action. I suggest you put some times and search VMware Pubs to create an alarm and customize the title and body of email. For example using following command you can create an alarm action to send mail to 1 people and 2 CC people with customize body and
using PowerCLI you can create an alarm email action and customize the title and body of email. For example
Get-AlarmDefinition -Name "Alarm1" | New-AlarmAction -Email -To 'test@vmware.com' -CC @('test1@vmware.com', 'test2@vmware.com') -Body 'Test body' -Subject 'Test subject'
For more information about New-AlarmAction command check this link.
Best Regards.