New-SPEnterpriseSearchCrawlContentSource
建立 Search Service 應用程式的內容來源。
Syntax
New-SPEnterpriseSearchCrawlContentSource
[-AssignmentCollection <SPAssignmentCollection>]
[-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>]
[-Confirm]
[-CrawlPriority <CrawlPriority>]
[-CustomProtocol <String>]
[-LOBSystemSet <String[]>]
[-MaxPageEnumerationDepth <Int32>]
[-MaxSiteEnumerationDepth <Int32>]
-Name <String>
-SearchApplication <SearchServiceApplicationPipeBind>
[-SharePointCrawlBehavior <SharePointCrawlBehavior>]
[-StartAddresses <String>]
[-Tag <String>]
-Type <ContentSourceType>
[-WhatIf]
[<CommonParameters>]
Description
New-SPEnterpriseSearchCrawlContentSource 指令程式會建立新的內容來源。
如需適用於 SharePoint 產品的 Windows PowerShell 權限及最新資訊,請參閱線上文件 SharePoint Server Cmdlet。
範例
------------------範例------------------
$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchCrawlContentSource -SearchApplication $ssa -Type File -name FileServer -StartAddresses file://someserver/public
此範例會建立類型為 file 的新內容來源,以編目檔案系統。
參數
-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 |
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 |
-LOBSystemSet
為商務類型內容來源指定以逗號分隔的 Business Data Connectivity 中繼資料存放區系統名稱和系統實例名稱清單。
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 |
-Name
指定要建立的內容來源名稱。
此類型必須是有效的 ContentSource 物件名稱 (例如 ContentSource1)。
Type: | String |
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、有效的 Search Service 應用程式名稱 (例如 SearchApp1),或有效的 SearchServiceApplication 物件執行個體。
Type: | SearchServiceApplicationPipeBind |
Position: | Named |
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 |
-SharePointCrawlBehavior
指定 SharePoint 類型內容來源的編目行為。 該行為可以是:
CrawlSites,只編目特定的網站集合。
CrawlVirtualServers,編目整部伺服器及伺服器上的所有網站集合。
Type: | SharePointCrawlBehavior |
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 |
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 |
-Type
指定內容來源類型的名稱。 Business 值適用於 Business Data Connectivity 中繼資料儲存區。 Exchange 值適用於 Microsoft Exchange 公用資料夾。 Custom 值適用於自訂內容來源類型。
此類型必須是有效的內容來源類型名稱,例如 custom。
Type: | ContentSourceType |
Aliases: | t |
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 |
-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 |