About Help

Choose a topic from the list on the left or search for a specific topic. Choose a topic from the list or search for a specific topic.
Cmdlets  Providers  Aliases  Modules
 

about_SPHealthAnalyzerRuleState

Sphealthanalyzerrulestate

SharePointDSC
 

SHORT DESCRIPTION

 

.NAME

    SPHealthAnalyzerRuleState 
 
# Description 
     
    This resource is used to configure Health Analyzer rules for the local farm. 
    The resource is able to enable/disable and configure the specified rule. 
     
.PARAMETER Name 
    Key - String 
    The name of the rule exactly as it appears in central admin 
 
.PARAMETER Enabled 
    Required - Boolean 
    Should the rule be enabled? 
 
.PARAMETER RuleScope 
    Write - String 
    Allowed values: All Servers, Any Server 
    What is the scope of this rule 
 
.PARAMETER Schedule 
    Write - String 
    Allowed values: Hourly, Daily, Weekly, Monthly, OnDemandOnly 
    How often should the rule check 
 
.PARAMETER FixAutomatically 
    Write - Boolean 
    Should the rule fix itself automatically 
 
.PARAMETER InstallAccount 
    Write - String 
    POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5 
 
 

.EXAMPLE

    This example shows how to disable a health analyzer rule  
 
 
    Configuration Example  
    { 
        param( 
            [Parameter(Mandatory = $true)] 
            [PSCredential] 
            $SetupAccount 
        ) 
        Import-DscResource -ModuleName SharePointDsc 
 
        node localhost { 
            SPHealthAnalyzerRuleState DisableDiskSpaceRule 
            { 
                Name = "Drives are at risk of running out of free space." 
                Enabled = $false 
                RuleScope   = "All Servers" 
                Schedule = "Daily" 
                FixAutomatically = $false 
                PsDscRunAsCredential = $SetupAccount 
            } 
        } 
    }