Skip to content

SPSearchServiceSettings

dscbot edited this page Mar 17, 2023 · 7 revisions

SPSearchServiceSettings

Parameters

Parameter Attribute DataType Description Allowed Values
IsSingleInstance Key String Specifies the resource is a single instance, the value must be 'Yes' Yes
PerformanceLevel Write String Specifies the performance level of the crawler Reduced, PartlyReduced, Maximum
ContactEmail Write String Specifies the contact email used by the crawler
WindowsServiceAccount Write PSCredential Sets the windows services for search to run as this account

Description

Type: Distributed Requires CredSSP: No

This resource is responsible for configuring settings for the search service, like the crawler performance level. All settings are farm wide settings, which is why this resource should only be used once in each configuration.

Examples

Example 1

This example creates a new search service app in the local farm

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount,

        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SearchAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPSearchServiceSettings SearchServiceSettings
        {
            IsSingleInstance      = "Yes"
            PerformanceLevel      = "Maximum"
            ContactEmail          = "[email protected]"
            WindowsServiceAccount = $SearchAccount
            PsDscRunAsCredential  = $SetupAccount
        }
    }
}
Clone this wiki locally