New-SPEnterpriseSearchCrawlContentSource

Creates a content source for a Search service application.

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

The New-SPEnterpriseSearchCrawlContentSource cmdlet creates a new content source.

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
New-SPEnterpriseSearchCrawlContentSource -SearchApplication $ssa -Type File -name FileServer -StartAddresses file://someserver/public

This example creates a new content source of type file to crawl a file system.

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

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

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

-CrawlPriority

Specifies the priority of this content source.

The value must be one of the following integers: 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

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

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

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

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

-Name

Specifies the name of the content source to create.

The type must be a valid name of a ContentSource object (for example, 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

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 service application name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

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

Specifies crawl behavior for a SharePoint type content source. The behavior can be either:

CrawlSites to crawl only particular site collections.

CrawlVirtualServers to crawl the entire server and all site collections on the server.

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

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

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

Specifies the name of the content source type. The value Business is for the Business Data Connectivity metadata store. The value Exchange is for Microsoft Exchange public folders. The value Custom is for a custom content source type.

The type must be the valid name of a content source type; for example, 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

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