New-SPEnterpriseSearchCrawlContentSource

 

Applies to: SharePoint Server 2010

Topic Last Modified: 2010-02-11

Creates a new crawl content source for a shared search application.

Syntax

New-SPEnterpriseSearchCrawlContentSource [-Name] <String> -SearchApplication <SearchServiceApplicationPipeBind> -Type <Business | O12Business | CustomRepository | Custom | Exchange | File | LotusNotes | SharePoint | Web> [-AssignmentCollection <SPAssignmentCollection>] [-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-Confirm [<SwitchParameter>]] [-CrawlPriority <Nullable>] [-CustomProtocol <String>] [-LOBSystemSet <String[]>] [-MaxPageEnumerationDepth <Nullable>] [-MaxSiteEnumerationDepth <Nullable>] [-SharePointCrawlBehavior <Nullable>] [-StartAddresses <String>] [-Tag <String>] [-WhatIf [<SwitchParameter>]]

Detailed Description

The New-SPEnterpriseSearchCrawlContentSource cmdlet creates a new content source.

Parameters

Parameter Required Type Description

Name

Required

System.String

Specifies the name of the content source to create.

The type must be a valid name of a ContentSource object (for example, ContentSource1.

SearchApplication

Yes

Microsoft.Office.Server.Search.Cmdlet.SearchServiceApplicationPipeBind

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

Type

Required

System.String

Specifies the name of the content source type. Valid values are web, sharepoint, custom, lotusnotes, custom, file, exchange (for Microsoft Exchange public folders), and business (for the Business Data Connectivity Metadata Store).

The type must be the valid name of a content source type; for example, custom.

AssignmentCollection

Optional

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

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.

Note

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.

BDCApplicationProxyGroup

Optional

Microsoft.SharePoint.PowerShell.SPServiceApplicationProxyGroupPipeBind

Specifies the proxy to use for a business type content source. This proxy group must contain a default Business Data Connectivity Metadata Store proxy.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

CrawlPriority

Optional

System.Nullable

Specifies the priority of this content source.

The type must one of the following integers: 1= Normal, 2=High.

CustomProtocol

Optional

Optional

Specifies the custom protocol, handled by the custom connector, to use for this content source.

LOBSystemSet

Optional

System.String[]

Specifies a comma-separated list of Business Data Connectivity Metadata Store system names and system instance names for a business type content source.

MaxPageEnumerationDepth

Optional

System.Nullable

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.

MaxSiteEnumerationDepth

Optional

System.Nullable

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.

SharePointCrawlBehavior

Optional

System.Nullable

Specifies crawl behavior for a sharepoint type content source. The search application behavior can be either:

Specify CrawlSites to crawl only particular site collections.

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

StartAddresses

Optional

System.String

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 http://server_name.

Tag

Optional

System.String

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 http://server_name.

WhatIf

Optional

System.Management.Automation.SwitchParameter

Input Types

Return Types

Example

------------------EXAMPLE------------------

$searchapp = Get-SPEnterpriseSearchServiceApplication "SearchApp1"
New-SPEnterpriseSearchCrawlContentSource -SearchApplication $searchapp -Type file -name somename -StartAddresses file://someserver/public

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

Note

A crawl schedule must be created by using the Set-SPEnterpriseSearchCrawlContentSource cmdlet to automatically crawl this content source.