i am running the attached script that pulls out the default event triggers for alarms in vcentre 4.1. for some reason it is breaking at line 10 with the following error message ..
Cannot index into a null array.
At :line:10 char:39
+ if ($alview.Info.Expression.Expression[ <<<< 0].gettype().Name -eq "EventAlarmExpression")
is anyone able to assist ?
thanks in advance
If there is only 1 expression, the Expression property will not be an array and hence you can not index it.
Btw, you can get all the alarms by doing
Alarms are not necessarily defined on the rootfolder.
Blog: LucD notes