hmscott4 / AlertManagement

Manage SCOM Alerts
2 stars 3 forks source link

Reduce the number of MPs in Assign Alert Config File #57

Closed hmscott4 closed 3 years ago

hmscott4 commented 3 years ago

Many MPs do not contain alert configurations. If it's a sealed MP, then, theoretically, it never will contain Alerts. We can reduce the size of the assign.alert.config file by test for this in the Create config files task.

Possible code: Get-SCOMMonitor -ManagementPack $MP | Where-Object {$.AlertSettings -ne $null} Get-SCOMRule -ManagementPack $MP | Where-Object {$.WriteActionCollection -match ""}

If either of the above is true, then the MP contains alerts and needs to go into the config file. Test only for Sealed MPs.

hmscott4 commented 3 years ago

Fixed.