Disable and set result for SharePoint 2013 Health Analysis Rules and Reports

By | 2016-03-02

I wanted to disable the SharePoint Health Rules in my Powershell script but it seemed the corresponding Health Report Item was not effected by the disable cmdlet.

While working out how Microsoft has implemented this functionality, I thought let’s share some details and the function that sets the Health Rules and the Severity of the Reports List item.

Some ways of getting the possible values of the Health Rules:

The choices that are available:

  • 0 – RuleExecutionFailure
  • 1 – Error
  • 2 – Warning
  • 3 – Information
  • 4 – Success

The Health Rules (Get-SPHealthAnalysisRule) and the Health Reports List (SPHealthReportsList) Items can be linked by the Rule Summary and the Report Item Name, another option is the value for the Field “HealthRuleType”. In the last case you need to get the rule from the internal SharePoint Rules List (SPHealthRulesList):

My function that takes an XML as input and disables the SharePoint Health Analysis Rules and sets the value in the Health Analysis Report List:

The corresponding XML part:


Leave a Reply

Your email address will not be published. Required fields are marked *