-
Notifications
You must be signed in to change notification settings - Fork 107
SPHealthAnalyzerRuleState
dscbot edited this page Mar 17, 2023
·
18 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Name | Key | String | The name of the rule exactly as it appears in central admin | |
Enabled | Required | Boolean | Should the rule be enabled? | |
RuleScope | Write | String | What is the scope of this rule |
All Servers , Any Server
|
Schedule | Write | String | How often should the rule check |
Hourly , Daily , Weekly , Monthly , OnDemandOnly
|
FixAutomatically | Write | Boolean | Should the rule fix itself automatically |
Type: Distributed Requires CredSSP: No
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.
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
}
}
}
- Home
- Getting Started
- Pre-requisites
- Installing the module
- Exporting SharePoint Configuration
- Creating Configuration Files
- Pre-created Examples
- Creating an Azure development environment
- Understanding Resources & Syntax
- Remote PowerShell Authentication
- Contributing to SharePointDsc
- Other useful modules for SharePoint DSC configurations