Set-SPEnterpriseSearchCrawlContentSource

设置 Search Service 应用程序的爬网内容源的属性。

语法

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>]

说明

此 cmdlet 包含多个参数集。 只能使用一个参数集中的参数,而不能结合使用不同参数集中的参数。 若要详细了解如何使用参数集,请参阅 Cmdlet 参数集

在最初配置搜索功能时以及添加任何新内容源后,cmdlet Set-SPEnterpriseSearchCrawlContentSource 会更新爬网内容源的规则。 调用此 cmdlet 一次以设置内容源的增量爬网计划,并再次调用它来设置完全爬网计划。

可选 EnableContinuousCrawls 参数的值可以为 True 或 False。 值 True 表示可对此内容源中的项进行持续爬网。 这将导致搜索系统自动启动增量爬网以处理对相应的数据存储库中的项进行的最新更改。 这有助于保持此内容源中的项的索引最新。 Search Service 应用程序管理员仍可以根据需要配置完全爬网。

有关适用于 SharePoint 产品的 Windows PowerShell 的权限和最新信息,请参阅 SharePoint Server cmdlet

示例

$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

本示例返回“本地 SharePoint 网站”内容源,并创建一个计划,以便每 30 天运行一次完全爬网,每小时运行一次增量爬网。

参数

-AssignmentCollection

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

管理对象以便正确进行处理。 使用 SPWeb 或 SPSite 等对象可能会耗用大量内存,而且在 Windows PowerShell 脚本中使用这些对象需要正确管理内存。 通过使用 SPAssignment 对象,可以将对象分配给变量,然后在不需要这些对象时对它们进行处理,以释放内存。 在使用 SPWeb、SPSite 或 SPSiteAdministration 对象时,如果不使用分配集合或 Global 参数,则会自动处理这些对象。

使用全局参数时,所有对象均包含在全局存储中。 如果未立即使用对象,或未通过使用 Stop-SPAssignment 命令来处理对象,则可能会发生内存不足的情况。

参数属性

类型:SPAssignmentCollection
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-BDCApplicationProxyGroup

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定用于 business 类型内容源的代理。 此代理组必须包含默认业务数据连接元数据存储代理。

参数属性

类型:SPServiceApplicationProxyGroupPipeBind
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Confirm

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

执行命令前,看到确认提示。 有关详细信息,请键入以下命令:get-help about_commonparameters

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:cf

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CrawlPriority

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定此内容源的优先级。

键入的值必须是以下整数之一:1=普通,2=高。

参数属性

类型:CrawlPriority
默认值:None
接受的值:Normal, High
支持通配符:False
不显示:False
别名:p

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CrawlScheduleDaysOfMonth

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定在设置 MonthlyCrawlSchedule 参数时要进行爬网的日期。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

MonthlyDate
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CrawlScheduleDaysOfWeek

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定在设置 WeeklyCrawlSchedule 参数时要进行爬网的日期。

参数属性

类型:DaysOfWeek
默认值:None
接受的值:Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Weekdays, Saturday, Weekends, Everyday
支持通配符:False
不显示:False

参数集

Weekly
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CrawlScheduleMonthsOfYear

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定在设置 MonthlyCrawlSchedule 参数时要进行爬网的月份。

参数属性

类型:MonthsOfYear
默认值:None
接受的值:January, February, March, April, May, June, July, August, September, October, November, December, AllMonths
支持通配符:False
不显示:False
别名:month

参数集

MonthlyDate
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CrawlScheduleRepeatDuration

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定爬网计划的重复次数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False
别名:duration

参数集

MonthlyDate
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
Weekly
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
Daily
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CrawlScheduleRepeatInterval

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定每次重复爬网计划的间隔分钟数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False
别名:interval

参数集

MonthlyDate
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
Weekly
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
Daily
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CrawlScheduleRunEveryInterval

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定两次爬网之间的间隔。

如果设置了 DailyCrawlSchedule 参数,则指定爬网的间隔天数。

如果设置了 WeeklyCrawlSchedule 参数,则指定爬网的间隔周数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False
别名:

参数集

Weekly
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
Daily
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CrawlScheduleStartDateTime

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定爬网的初始日期。 默认值为当前的午夜。

参数属性

类型:DateTime
默认值:None
支持通配符:False
不显示:False
别名:start

参数集

MonthlyDate
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
Weekly
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
Daily
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-CustomProtocol

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定由自定义连接器处理的用于此内容源的自定义协议。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DailyCrawlSchedule

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

计划基于爬网的间隔天数。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:日常

参数集

Daily
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-EnableContinuousCrawls

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定 EnableContinuousCrawls 参数的值:True 或 False。

参数属性

类型:Boolean
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Identity

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定要更新的爬网内容源。

键入的值必须为 12345678-90ab-cdef-1234-567890bcdefgh 形式的有效 GUID;ContentSource 对象的有效名称(如 ContentSource1);或有效 ContentSource 对象的实例。

参数属性

类型:ContentSourcePipeBind
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:0
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-LOBSystemSet

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

为 business 类型内容源指定一个以逗号分隔的业务数据连接元数据存储系统名称和系统实例名称的列表。

参数属性

类型:

String[]

默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-MaxPageEnumerationDepth

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

为 web 或 custom 类型内容源指定爬网程序从开始地址爬网到内容项可执行的页面跃点数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-MaxSiteEnumerationDepth

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

为 web 或 custom 类型内容源指定爬网程序从开始地址爬网到内容项可执行的网站跃点数。

参数属性

类型:Int32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-MonthlyCrawlSchedule

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

计划基于爬网的间隔月份数。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:每月

参数集

MonthlyDate
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Name

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

为内容源指定新的显示名称。

键入的值必须是有效的内容源名称;例如,ContentSource1。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False
别名:n

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-RemoveCrawlSchedule

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

删除指定的爬网。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

RemoveSchedule
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ScheduleType

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定爬网计划的类型。

键入的值必须是以下项之一:Full 或 Incremental。

参数属性

类型:ContentSourceCrawlScheduleType
默认值:None
接受的值:Full, Incremental, Full, Incremental
支持通配符:False
不显示:False

参数集

Daily
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
MonthlyDate
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
Weekly
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False
RemoveSchedule
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SearchApplication

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定包含内容源的搜索应用程序。

键入的值必须是 12345678-90ab-cdef-1234-567890bcdefgh 形式的有效 GUID;有效的搜索应用程序名称(如 SearchApp1);或有效 SearchServiceApplication 对象的实例。

参数属性

类型:SearchServiceApplicationPipeBind
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-StartAddresses

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定对此内容源进行爬网的起始 URL 的列表(用逗号分隔)。

类型必须是有效的 URL,格式为 https://server_name.

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False
别名:s

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Tag

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定自定义内容源设置的修改页面的 URL。 指定 URL 的字符串最多可包含 1,024 个字符。

类型必须是有效的 URL,格式为 https://server_name.

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False
别名:t

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WeeklyCrawlSchedule

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

计划基于爬网的间隔周数。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:周刊

参数集

Weekly
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WhatIf

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

显示一条描述命令作用的消息,而不执行命令。 有关详细信息,请键入以下命令:get-help about_commonparameters

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:无线

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters

输入

Microsoft.Office.Server.Search.Cmdlet.ContentSourcePipeBind

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

输出

System.Object