共用方式為


Set-SPEnterpriseSearchCrawlContentSource

設定 Search Service 應用程式之編目內容來源的屬性。

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

此 Cmdlet 包含一個以上的參數集。 您可能只會使用到一個參數集中的參數,而且您無法合併不同參數集中的參數。 如需如何使用參數集的詳細資訊,請參閱 Cmdlet 參數集

Set-SPEnterpriseSearchCrawlContentSource Cmdlet 會在一開始設定搜尋功能時,以及新增任何新的內容來源之後,更新編目內容來源的規則。 此 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

管理物件以適當處置它們。 使用 SPWeb 或 SPSite 等物件可能會耗用大量的記憶體,因此在 Windows PowerShell 指令碼中使用這些物件時,必須適當地管理記憶體。 您可以使用 SPAssignment 物件將物件指派給變數,並在不需要時處置這些物件,以釋放記憶體。 使用 SPWeb、SPSite 或 SPSiteAdministration 物件時,若未使用指派集合或 Global 參數,將會自動處置這些物件。

使用 Global 參數時,所有物件會包含在全域儲存區內。 如果不立即使用物件,或使用 Stop-SPAssignment 命令加以捨棄,則可能會有記憶體不足的狀況發生。

Type:SPAssignmentCollection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-BDCApplicationProxyGroup

指定要用於 business 類型內容來源的 Proxy。 此 Proxy 群組必須包含預設 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 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-Confirm

在執行命令之前,提示您確認操作。 如需詳細資訊,請輸入下列命令: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 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-CrawlPriority

指定此內容來源的優先順序。

此類型必須是下列其中一個整數: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 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-CrawlScheduleDaysOfMonth

指定當設定 MonthlyCrawlSchedule 參數時要編目的日子。

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-CrawlScheduleDaysOfWeek

指定當設定 WeeklyCrawlSchedule 參數時要編目的日子。

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 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-CrawlScheduleMonthsOfYear

指定當設定 MonthlyCrawlSchedule 參數時要編目的月份。

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 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-CrawlScheduleRepeatDuration

指定要重複編目排程的次數。

Type:Int32
Aliases:duration
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-CrawlScheduleRepeatInterval

指定編目排程的每個重複間隔之間的分鐘數。

Type:Int32
Aliases:interval
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-CrawlScheduleRunEveryInterval

指定編目的間隔。

當設定 DailyCrawlSchedule 參數時,請指定編目之間的天數。

當設定 WeeklyCrawlSchedule 參數時,請指定編目之間的週數。

Type:Int32
Aliases:every
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-CrawlScheduleStartDateTime

指定編目的起始日期。 預設值為當天的午夜。

Type:DateTime
Aliases:start
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-CustomProtocol

指定要用於此內容來源的自訂通訊協定 (由自訂連接器處理)。

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-DailyCrawlSchedule

使排程根據編目之間的天數。

Type:SwitchParameter
Aliases:daily
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-EnableContinuousCrawls

指定 EnableContinuousCrawls 參數的值:True 或 False。

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-Identity

指定要更新的編目內容來源。

此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID;有效之 ContentSource 物件的名稱 (例如 ContentSource1);或有效之 ContentSource 物件的執行個體。

Type:ContentSourcePipeBind
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-LOBSystemSet

針對 business 類型內容來源,指定 Business Data Connectivity Metadata Store 系統名稱及系統執行個體名稱的以逗號分隔清單。

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-MaxPageEnumerationDepth

針對 web 或 custom 類型內容來源,指定編目器可以從內容項目的開始位址進行的網頁旋入數目。

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-MaxSiteEnumerationDepth

針對 web 或 custom 類型內容來源,指定編目器可以從內容項目的開始位址採取的網站旋入數目。

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-MonthlyCrawlSchedule

使排程以編目之間的月數為根據。

Type:SwitchParameter
Aliases:monthly
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-Name

指定內容來源的新顯示名稱。

此類型必須是有效的內容來源名稱,例如 ContentSource1。

Type:String
Aliases:n
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-RemoveCrawlSchedule

刪除指定的編目。

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-ScheduleType

指定編目排程的類型。

此類型必須是下列其中一個值:Full 或 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 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-SearchApplication

指定包含內容來源的搜尋應用程式。

此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID;有效的搜尋應用程式名稱 (例如 SearchApp1);或有效之 SearchServiceApplication 物件的執行個體。

Type:SearchServiceApplicationPipeBind
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-StartAddresses

指定以逗號區隔的清單,列出此內容來源開始編目的 URL。

類型必須是有效的 URL,格式為 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 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-Tag

指定網頁的 URL,以修改自訂內容來源的設定。 指定 URL 的字串最多可包含 1,024 個字元。

類型必須是有效的 URL,格式為 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 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-WeeklyCrawlSchedule

使排程根據編目之間的週數。

Type:SwitchParameter
Aliases:weekly
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-WhatIf

顯示訊息會描述命令的功效而不執行命令。 如需詳細資訊,請輸入下列命令: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 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

輸入

Microsoft.Office.Server.Search.Cmdlet.ContentSourcePipeBind

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

輸出

System.Object