New-SPEnterpriseSearchCrawlContentSource
为 Search Service 应用程序创建内容源。
语法
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>]
说明
New-SPEnterpriseSearchCrawlContentSource cmdlet 创建新的内容源。
有关适用于 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 Subscription Edition |
-BDCApplicationProxyGroup
指定用于 business 类型内容源的代理。 此代理组必须包含默认业务数据连接元数据存储代理。
Type: | SPServiceApplicationProxyGroupPipeBind |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-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 Subscription Edition |
-CrawlPriority
指定此内容源的优先级。
键入的值必须是以下整数之一:1=普通,2=高。
Type: | CrawlPriority |
Aliases: | p |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-CustomProtocol
指定由自定义连接器处理的用于此内容源的自定义协议。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-LOBSystemSet
为业务类型内容类型源指定以逗号分隔的业务数据连接元数据存储系统名称和系统实例名称的列表。
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-MaxPageEnumerationDepth
为 web 或 custom 类型内容源指定爬网程序从开始地址爬网到内容项可执行的页面跃点数。
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-MaxSiteEnumerationDepth
为 web 或 custom 类型内容源指定爬网程序从开始地址爬网到内容项可执行的网站跃点数。
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Name
指定要创建的内容源的名称。
键入的值必须是 ContentSource 对象的有效名称(例如 ContentSource1)。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-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 Subscription Edition |
-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 Subscription Edition |
-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 Subscription Edition |
-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 Subscription Edition |
-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 Subscription Edition |
-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 Subscription Edition |