Having a persistent problem with teammembers forgetting to re-enable alarm actions at the host and cluster level.
Anyone know of script that will list or report all hosts and clusters with alarm actions set to "disabled"?
By right clicking on a DC, Cluster or Host, ou can disable/enable Alarm actions. I want to use a script to automate this at each level: To report on all that are enabled disabled, and change the state to enabled or disabled.
Thanks for the work you put into this, but I can't get it to work.
I'm running PowerClI 5.1 r2. I save your code as a ps file and run it and get nothing.
If I try to run the following samples
I get errors with anything referencing AlarmActionState: "....is not recognized as the name of a cmdlet, function, script file.....
Did you dot-source the 2 functions from my post ?
If not, please the functions in a .ps1 file (for example AlarmActions.ps1), and then dot-source the .ps1 file
PS C:\Scripts> . ./AlarmActions.ps1
This assumes you stored the .ps1 file in the folder C:\Scripts.
Once that is done you should be able to call both functions