Set-SPEnterpriseSearchCrawlContentSource
Sets the properties of a crawl content source for a Search service application.
Syntax
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>]
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>]
Set-SPEnterpriseSearchCrawlContentSource
[-Identity] <ContentSourcePipeBind>
[-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>]
-ScheduleType <ContentSourceCrawlScheduleType>
[-SearchApplication <SearchServiceApplicationPipeBind>]
[-StartAddresses <String>]
[-Tag <String>]
[-WhatIf]
[<CommonParameters>]
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
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.
Type: | SPAssignmentCollection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-BDCApplicationProxyGroup
Specifies the proxy to use for a business type content source. This proxy group must contain a default Business Data Connectivity Metadata Store proxy.
Type: | SPServiceApplicationProxyGroupPipeBind |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Confirm
Prompts you for confirmation before executing the command.
For more information, type the following command: get-help about_commonparameters
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-CrawlPriority
Specifies the priority of this content source.
The type must be one of the following integers: 1= Normal, 2=High.
Type: | CrawlPriority |
Aliases: | p |
Accepted values: | Normal, High |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-CrawlScheduleDaysOfMonth
Specifies the days on which to crawl when the MonthlyCrawlSchedule parameter is set.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-CrawlScheduleDaysOfWeek
Specifies the days on which to crawl when the WeeklyCrawlSchedule parameter is set.
Type: | DaysOfWeek |
Accepted values: | Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Weekdays, Saturday, Weekends, Everyday |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-CrawlScheduleMonthsOfYear
Specifies the months on which to crawl when the MonthlyCrawlSchedule parameter is set.
Type: | MonthsOfYear |
Aliases: | month |
Accepted values: | January, February, March, April, May, June, July, August, September, October, November, December, AllMonths |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-CrawlScheduleRepeatDuration
Specifies the number of times to repeat the crawl schedule.
Type: | Int32 |
Aliases: | duration |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-CrawlScheduleRepeatInterval
Specifies the number of minutes between each repeat interval for the crawl schedule
Type: | Int32 |
Aliases: | interval |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-CrawlScheduleRunEveryInterval
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.
Type: | Int32 |
Aliases: | every |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-CrawlScheduleStartDateTime
Specifies the initial date of the crawl. The default value is midnight on the current day.
Type: | DateTime |
Aliases: | start |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-CustomProtocol
Specifies the custom protocol, handled by the custom connector, to use for this content source.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-DailyCrawlSchedule
Base schedule on days between crawls.
Type: | SwitchParameter |
Aliases: | daily |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-EnableContinuousCrawls
Specifies the value of the EnableContinuousCrawls parameter: True or False.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Identity
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.
Type: | ContentSourcePipeBind |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-LOBSystemSet
Specifies a comma-separated list of Business Data Connectivity Metadata Store system names and system instance names for a business type content source.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-MaxPageEnumerationDepth
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.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-MaxSiteEnumerationDepth
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.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-MonthlyCrawlSchedule
Base the schedule on months between crawls.
Type: | SwitchParameter |
Aliases: | monthly |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Name
Specifies the new display name for the content source.
The type must be a valid name of a content source; for example, ContentSource1.
Type: | String |
Aliases: | n |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-RemoveCrawlSchedule
Deletes the specified crawl.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-ScheduleType
Specifies the type of crawl schedule.
The type must be one of the following values: Full or Incremental.
Type: | ContentSourceCrawlScheduleType |
Accepted values: | Full, Incremental, Full, Incremental, Full, Incremental, Full, Incremental |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-SearchApplication
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.
Type: | SearchServiceApplicationPipeBind |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-StartAddresses
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.
Type: | String |
Aliases: | s |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Tag
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.
Type: | String |
Aliases: | t |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-WeeklyCrawlSchedule
Base the schedule on weeks between crawls.
Type: | SwitchParameter |
Aliases: | weekly |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-WhatIf
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
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
Inputs
Microsoft.Office.Server.Search.Cmdlet.ContentSourcePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection
Outputs
System.Object