Luc,
Thank you very much for your example.
However, looks like there is some bug in a code (again, I really appreciate you for help)
This code will create an alarm, but I will not be able even to check the settings on my it through VC. "Edit settings" on this new alarm would be grey out (I can "remove" it).
If I will run the same code without creating SNMP (take away the following lines:
$alarm.action = New-Object VMware.Vim.AlarmTriggeringAction
$alarm.action.action = New-Object VMware.Vim.SendSNMPAction
$trans = New-Object VMware.Vim.AlarmTriggeringActionTransitionSpec
$trans.startstate = "yellow"
$trans.finalstate = "red"
$trans.repeats = $false
$alarm.action.transitionspecs += $trans).
it creates new alarm and I can see all setting on it.
Again, looks like something wrong with this code for alarm action -SNMP (6 lines above).
Is there something I need to adjust?
Thanks,
qwert