-
Notifications
You must be signed in to change notification settings - Fork 108
SPSearchContentSource
Brian Farnhill edited this page Jun 2, 2016
·
19 revisions
Parameters
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
| Name | Key | String | The name of the content source | |
| ServiceAppName | Key | String | The name of the search service app that this content source exists within | |
| ContentSourceType | Required | String | The type of content source - currently only SharePoint, Website and File Shares are supported | SharePoint, Website, FileShare |
| Addresses | Required | String | A list of the addresses this content source includes | |
| CrawlSetting | Required | String | Should the crawler index everything, just the first site or page, or a custom depth (applies to websites only) | CrawlEverything, CrawlFirstOnly, Custom |
| ContinuousCrawl | Write | Boolean | Should this content source use continuous crawl (SharePoint sites only) | |
| IncrementalSchedule | Write | String | What is the incremental schedule for this content source | |
| FullSchedule | Write | String | What is the full schedule for this content source | |
| Priority | Write | String | What is the priority on this content source | Normal, High |
| LimitPageDepth | Write | Uint32 | How many pages deep should the crawler go (-1 = unlimited, website sources only) | |
| LimitServerHops | Write | Uint32 | How many server hops should the crawler make (-1 = unlimtied, website sources only) | |
| Ensure | Write | string | Present if the source should exist, absent if it should not | Present, Absent |
| Force | Write | Boolean | Specify true if DSC is allowed to delete and recreate a content source to apply the correct settings, otherwise false will just report errors if a change can not be applied. | |
| InstallAccount | Write | String | POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsAccount if using PowerShell 5 |
Description
This resource will deploy and configure a content source in a specified search service application.
Example
This example is for a SharePoint content source
SPSearchContentSource LocalSharePointSites
{
Name = "Local SharePoint Sites"
ServiceAppName = "Search Service Application"
ContentSourceType = "SharePoint"
Addresses = @("http://sharepointsite1.contoso.com", "http://sharepointsite2.contoso.com")
CrawlSetting = "CrawlEverything"
ContinuousCrawl = $true
IncrementalSchedule = MSFT_SPSearchCrawlSchedule @{
ScheduleType = "Daily"
StartHour = "0"
StartMinute = "0"
CrawlScheduleRepeatDuration = "1440"
CrawlScheduleRepeatInterval = "5"
}
FullSchedule = $null
Priority = "Normal"
Ensure = "Present"
PsDscRunAsCredential = $SPSetupAccount
DependsOn = "[SPSearchRoles]LocalSearchRoles"
}
This example is for a website content source
SPSearchContentSource LocalSharePointSites
{
Name = "Local SharePoint Sites"
ServiceAppName = "Search Service Application"
ContentSourceType = "Website"
Addresses = @("http://www.contoso.com")
CrawlSetting = "Custom"
LimitPageDepth = 5
LimitServerHops = 0
IncrementalSchedule = MSFT_SPSearchCrawlSchedule @{
ScheduleType = "Daily"
StartHour = "0"
StartMinute = "0"
CrawlScheduleRepeatDuration = "1440"
CrawlScheduleRepeatInterval = "5"
}
FullSchedule = MSFT_SPSearchCrawlSchedule @{
ScheduleType = "Weekly"
CrawlScheduleDaysOfWeek = @("Monday", "Wednesday", "Friday")
StartHour = "3"
StartMinute = "0"
}
Priority = "Normal"
Ensure = "Present"
PsDscRunAsCredential = $SPSetupAccount
DependsOn = "[SPSearchRoles]LocalSearchRoles"
}

- 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