New-SPEnterpriseSearchCrawlContentSource
Published: July 16, 2012
Applies to: SharePoint Server 2013 Enterprise | SharePoint Server 2013 Standard | SharePoint Foundation 2013
Creates a content source for a Search service application.
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>]]
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 service application name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object. | ||
| Type | Required | Microsoft.Office.Server.Search.Administration.ContentSourceType | 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. | ||
| 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.
| ||
| 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 value must be one of the following integers: 1= Normal, 2=High. | ||
| CustomProtocol | Optional | System.String | 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 behavior can be either: CrawlSites to crawl only particular site collections. 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 | 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 |
Detailed Description
The New-SPEnterpriseSearchCrawlContentSource cmdlet creates a new content source.
Input Types
Return Types
------------------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.
Change History
| Date | Description |
|---|---|
| July 16, 2012 | Initial publication |

Note: