Site.RunHealthCheck method

Runs a health check as follows. (The health rules referenced below perform an implementation-dependent check on the health of a site collection.)If ruleId is not an empty GUID, runs the specified site collection health rule and returns a summary of the results. If ruleId is an empty GUID, runs all of the site collection health rules and returns a summary of the results.If bRepair is true, runs the specified rules in repair mode. In this case, and if a given rule is repairable, an attempt will be made to repair issues found by the rule, and the results from that attempted repairs are returned. If bRepair is false, an attempt to repair issues found is not made.If bRunAlways is true, rules are always run by this method, and the results are returned. If false, cached results from a recent previous run can be returned instead.

Namespace:  Microsoft.SharePoint.Client
Assembly:  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
Public Function RunHealthCheck ( _
    ruleId As Guid, _
    bRepair As Boolean, _
    bRunAlways As Boolean _
) As SiteHealthSummary
'Usage
Dim instance As Site
Dim ruleId As Guid
Dim bRepair As Boolean
Dim bRunAlways As Boolean
Dim returnValue As SiteHealthSummary

returnValue = instance.RunHealthCheck(ruleId, _
    bRepair, bRunAlways)
public SiteHealthSummary RunHealthCheck(
    Guid ruleId,
    bool bRepair,
    bool bRunAlways
)

Parameters

  • ruleId
    Type: System.Guid

    Specifies the rule or rules to be run. If the value is an empty GUID, all rules are run, otherwise only the specified rule is run.

  • bRepair
    Type: System.Boolean

    Specifies whether repairable rules are to be run in repair mode.

  • bRunAlways
    Type: System.Boolean

    Specifies whether the rules will be run as a result of this call or cached results from a previous run can be returned.

Return value

Type: Microsoft.SharePoint.Client.SiteHealth.SiteHealthSummary

See also

Reference

Site class

Site members

Microsoft.SharePoint.Client namespace