Could you please try:
For all hosts
$alarmMgr = Get-View AlarmManager
Get-VMHost | foreach-object{
$alarmMgr.EnableAlarmActions($_.Extensiondata.MoRef,$true)
}
For host starting with D.
$alarmMgr = Get-View AlarmManager
Get-VMHost D* | foreach-object{
$alarmMgr.EnableAlarmActions($_.Extensiondata.MoRef,$true)
}
(I am not able to test the script right now)