Edit

Share via


Set-SPEnterpriseSearchCrawlContentSource

Sets the properties of a crawl content source for a Search service application.

Syntax

MonthlyDate

Set-SPEnterpriseSearchCrawlContentSource
    [-Identity] <ContentSourcePipeBind>
    [-AssignmentCollection <SPAssignmentCollection>]
    [-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>]
    [-Confirm]
    [-CrawlPriority <CrawlPriority>]
    [-CrawlScheduleDaysOfMonth <Int32>]
    [-CrawlScheduleMonthsOfYear <MonthsOfYear>]
    [-CrawlScheduleRepeatDuration <Int32>]
    [-CrawlScheduleRepeatInterval <Int32>]
    [-CrawlScheduleStartDateTime <DateTime>]
    [-CustomProtocol <String>]
    [-EnableContinuousCrawls <Boolean>]
    [-LOBSystemSet <String[]>]
    [-MaxPageEnumerationDepth <Int32>]
    [-MaxSiteEnumerationDepth <Int32>]
    [-MonthlyCrawlSchedule]
    [-Name <String>]
    [-ScheduleType <ContentSourceCrawlScheduleType>]
    [-SearchApplication <SearchServiceApplicationPipeBind>]
    [-StartAddresses <String>]
    [-Tag <String>]
    [-WhatIf]
    [<CommonParameters>]

Weekly

Set-SPEnterpriseSearchCrawlContentSource
    [-Identity] <ContentSourcePipeBind>
    [-AssignmentCollection <SPAssignmentCollection>]
    [-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>]
    [-Confirm]
    [-CrawlPriority <CrawlPriority>]
    [-CrawlScheduleDaysOfWeek <DaysOfWeek>]
    [-CrawlScheduleRepeatDuration <Int32>]
    [-CrawlScheduleRepeatInterval <Int32>]
    [-CrawlScheduleRunEveryInterval <Int32>]
    [-CrawlScheduleStartDateTime <DateTime>]
    [-CustomProtocol <String>]
    [-EnableContinuousCrawls <Boolean>]
    [-LOBSystemSet <String[]>]
    [-MaxPageEnumerationDepth <Int32>]
    [-MaxSiteEnumerationDepth <Int32>]
    [-Name <String>]
    [-ScheduleType <ContentSourceCrawlScheduleType>]
    [-SearchApplication <SearchServiceApplicationPipeBind>]
    [-StartAddresses <String>]
    [-Tag <String>]
    [-WeeklyCrawlSchedule]
    [-WhatIf]
    [<CommonParameters>]

Daily

Set-SPEnterpriseSearchCrawlContentSource
    [-Identity] <ContentSourcePipeBind>
    -ScheduleType <ContentSourceCrawlScheduleType>
    [-AssignmentCollection <SPAssignmentCollection>]
    [-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>]
    [-Confirm]
    [-CrawlPriority <CrawlPriority>]
    [-CrawlScheduleRepeatDuration <Int32>]
    [-CrawlScheduleRepeatInterval <Int32>]
    [-CrawlScheduleRunEveryInterval <Int32>]
    [-CrawlScheduleStartDateTime <DateTime>]
    [-CustomProtocol <String>]
    [-DailyCrawlSchedule]
    [-EnableContinuousCrawls <Boolean>]
    [-LOBSystemSet <String[]>]
    [-MaxPageEnumerationDepth <Int32>]
    [-MaxSiteEnumerationDepth <Int32>]
    [-Name <String>]
    [-SearchApplication <SearchServiceApplicationPipeBind>]
    [-StartAddresses <String>]
    [-Tag <String>]
    [-WhatIf]
    [<CommonParameters>]

RemoveSchedule

Set-SPEnterpriseSearchCrawlContentSource
    [-Identity] <ContentSourcePipeBind>
    [-AssignmentCollection <SPAssignmentCollection>]
    [-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>]
    [-Confirm]
    [-CrawlPriority <CrawlPriority>]
    [-CustomProtocol <String>]
    [-EnableContinuousCrawls <Boolean>]
    [-LOBSystemSet <String[]>]
    [-MaxPageEnumerationDepth <Int32>]
    [-MaxSiteEnumerationDepth <Int32>]
    [-Name <String>]
    [-RemoveCrawlSchedule]
    [-ScheduleType <ContentSourceCrawlScheduleType>]
    [-SearchApplication <SearchServiceApplicationPipeBind>]
    [-StartAddresses <String>]
    [-Tag <String>]
    [-WhatIf]
    [<CommonParameters>]

Description

This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet parameter sets.

The Set-SPEnterpriseSearchCrawlContentSource cmdlet updates the rules of a crawl content source when the search functionality is initially configured and after any new content source is added. This cmdlet is called once to set the incremental crawl schedule for a content source and it is called again to set a full crawl schedule.

The value of the optional EnableContinuousCrawls parameter can be True or False. A value of True enables continuous crawls of items in this content source. This causes the search system to automatically start incremental crawls to process the latest changes to items in the corresponding data repositories. This helps to keep the index fresh for items in this content source. Search service application administrators can still configure full crawls as needed.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at SharePoint Server Cmdlets.

Examples

EXAMPLE

$ssa = Get-SPEnterpriseSearchServiceApplication
$cs = Get-SPEnterpriseSearchCrawlContentSource -Identity 'Local SharePoint Sites' -SearchApplication $ssa
$cs | Set-SPEnterpriseSearchCrawlContentSource -ScheduleType Full -DailyCrawlSchedule -CrawlScheduleRunEveryInterval 30
$cs | Set-SPEnterpriseSearchCrawlContentSource -ScheduleType Incremental -DailyCrawlSchedule -CrawlScheduleRepeatInterval 60 -CrawlScheduleRepeatDuration 1440

This example returns the "Local SharePoint Sites" content source and creates a schedule to run a full crawl every 30 days and an incremental crawl every hour every day.

Parameters

-AssignmentCollection

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Parameter properties

Type:SPAssignmentCollection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-BDCApplicationProxyGroup

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the proxy to use for a business type content source. This proxy group must contain a default Business Data Connectivity Metadata Store proxy.

Parameter properties

Type:SPServiceApplicationProxyGroupPipeBind
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CrawlPriority

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the priority of this content source.

The type must be one of the following integers: 1= Normal, 2=High.

Parameter properties

Type:CrawlPriority
Default value:None
Accepted values:Normal, High
Supports wildcards:False
DontShow:False
Aliases:p

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CrawlScheduleDaysOfMonth

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the days on which to crawl when the MonthlyCrawlSchedule parameter is set.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

MonthlyDate
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CrawlScheduleDaysOfWeek

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the days on which to crawl when the WeeklyCrawlSchedule parameter is set.

Parameter properties

Type:DaysOfWeek
Default value:None
Accepted values:Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Weekdays, Saturday, Weekends, Everyday
Supports wildcards:False
DontShow:False

Parameter sets

Weekly
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CrawlScheduleMonthsOfYear

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the months on which to crawl when the MonthlyCrawlSchedule parameter is set.

Parameter properties

Type:MonthsOfYear
Default value:None
Accepted values:January, February, March, April, May, June, July, August, September, October, November, December, AllMonths
Supports wildcards:False
DontShow:False
Aliases:month

Parameter sets

MonthlyDate
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CrawlScheduleRepeatDuration

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the number of times to repeat the crawl schedule.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:duration

Parameter sets

MonthlyDate
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Weekly
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Daily
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CrawlScheduleRepeatInterval

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the number of minutes between each repeat interval for the crawl schedule

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:interval

Parameter sets

MonthlyDate
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Weekly
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Daily
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CrawlScheduleRunEveryInterval

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the interval between crawls.

When the DailyCrawlSchedule parameter is set, specifies the number of days between crawls.

When the WeeklyCrawlSchedule parameter is set, specifies the number of weeks between crawls.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:every

Parameter sets

Weekly
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Daily
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CrawlScheduleStartDateTime

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the initial date of the crawl. The default value is midnight on the current day.

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False
Aliases:start

Parameter sets

MonthlyDate
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Weekly
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Daily
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomProtocol

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the custom protocol, handled by the custom connector, to use for this content source.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DailyCrawlSchedule

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Base schedule on days between crawls.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:daily

Parameter sets

Daily
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableContinuousCrawls

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the value of the EnableContinuousCrawls parameter: True or False.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Identity

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the crawl content source to update.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a ContentSource object (for example, ContentSource1); or an instance of a valid ContentSource object.

Parameter properties

Type:ContentSourcePipeBind
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-LOBSystemSet

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies a comma-separated list of Business Data Connectivity Metadata Store system names and system instance names for a business type content source.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MaxPageEnumerationDepth

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies, for a web or custom type content source, the number of page hops that the crawler can make from the start address to a content item.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MaxSiteEnumerationDepth

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies, for a web or custom type content source, the number of site hops that the crawler can take from the start address to a content item.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MonthlyCrawlSchedule

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Base the schedule on months between crawls.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:monthly

Parameter sets

MonthlyDate
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the new display name for the content source.

The type must be a valid name of a content source; for example, ContentSource1.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:n

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RemoveCrawlSchedule

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Deletes the specified crawl.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RemoveSchedule
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ScheduleType

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the type of crawl schedule.

The type must be one of the following values: Full or Incremental.

Parameter properties

Type:ContentSourceCrawlScheduleType
Default value:None
Accepted values:Full, Incremental, Full, Incremental
Supports wildcards:False
DontShow:False

Parameter sets

Daily
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
MonthlyDate
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Weekly
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RemoveSchedule
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SearchApplication

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the search application that contains the content source.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Parameter properties

Type:SearchServiceApplicationPipeBind
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StartAddresses

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the comma-separated list of URLs at which to start a crawl for this content source.

The type must be a valid URL, in the form https://server_name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:s

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Tag

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies the URL for the page to modify the settings for a custom content source. The string that specifies the URL can contain a maximum of 1,024 characters.

The type must be a valid URL, in the form https://server_name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:t

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WeeklyCrawlSchedule

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Base the schedule on weeks between crawls.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:weekly

Parameter sets

Weekly
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.Office.Server.Search.Cmdlet.ContentSourcePipeBind

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs

System.Object