-
Notifications
You must be signed in to change notification settings - Fork 108
SPSearchCrawlRule
Brian Farnhill edited this page Dec 9, 2016
·
19 revisions
Parameters
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
| Path | Key | string | The name of the search service application | |
| ServiceAppName | Required | string | The name of the search service application | |
| AuthenticationType | Write | string | Authentication type used by the crawl rule | DefaultRuleAccess, BasicAccountRuleAccess, CertificateRuleAccess, NTLMAccountRuleAccess, FormRuleAccess, CookieRuleAccess, AnonymousAccess |
| RuleType | Write | string | The type of the rule | InclusionRule, ExclusionRule |
| CrawlConfigurationRules | Write | string | The configuration options for this rule | FollowLinksNoPageCrawl, CrawlComplexUrls, CrawlAsHTTP |
| AuthenticationCredentials | Write | String | The credentials used for this crawl rule (used for types BasicAccountRuleAccess and NTLMAccountRuleAccess) | |
| CertificateName | Write | string | The certificate used for this crawl rule (used for type CertificateRuleAccess) | |
| Ensure | Write | string | Present if the service app should exist, absent if it should not | Present, Absent |
| InstallAccount | Write | String | POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5 |
This resource is responsible for managing the search crawl rules in the search service application. You can create new rules, change existing rules and remove existing rules.
Examples
Example 1
This example shows how to apply settings to a sepcific URL in search
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost {
SPSearchCrawlRule IntranetCrawlAccount
{
Path = "https://intranet.sharepoint.contoso.com"
ServiceAppName = "Search Service Application"
Ensure = "Present"
RuleType = "InclusionRule"
CrawlConfigurationRules = "FollowLinksNoPageCrawl","CrawlComplexUrls", "CrawlAsHTTP"
AuthenticationType = "DefaultRuleAccess"
PsDscRunAsCredential = $SetupAccount
}
}
}
Example 2
This example shows how to set a certificate for authentication to a content source
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost {
SPSearchCrawlRule IntranetCrawlAccountCertificate
{
Path = "https://intranet.sharepoint.contoso.com"
ServiceAppName = "Search Service Application"
Ensure = "Present"
RuleType = "InclusionRule"
CrawlConfigurationRules = "FollowLinksNoPageCrawl","CrawlComplexUrls", "CrawlAsHTTP"
AuthenticationType = "CertificateRuleAccess"
CertificateName = "Certificate Name"
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