I have over 1000 inactive alerts and looking for an expedited way to clear these out. Currently only able to do it 8 or so at a time by going to 'Alerts' tab selecting each of them, going to actions and deleting cancelled alerts.
Looking for a better way, thanks!
Can you expand on the commands?
i am able to run "Get-OMAlert -Status Active | Set-OMAlert -Cancel" which changes the alerts from "active" to "cancel" state.
How do I then delete canceled alerts?
from a quick google search i found Set-OMAlert only has few syntax and delete in not one of them
You'll probably have to use the REST API to delete the cancelled alerts. It's not built in to PowerCLI. It's possible to access the API using "ExtensionData", explained here:
However I searched and wasn't able to find the new delete API anywhere in PowerCLI. The vROps module hasn't been updated in a while so I suspect that might be why... or it's possible I missed it somewhere.
Either way I think it's worth noting that vROps will delete cancelled alerts automatically based on the global settings. The default is after 30 days. If you can work off of active alerts and think of the cancelled ones as just historical records they should clean themselves up after a while.