Export (0) Print
Expand All
Expand Minimize

New-SPEnterpriseSearchCrawlRule

 

Applies to: SharePoint Server 2013 Standard, SharePoint Server 2013 Enterprise, SharePoint Foundation 2013

Topic Last Modified: 2014-06-25

Creates a new crawl rule.

New-SPEnterpriseSearchCrawlRule -Path <String> -SearchApplication <SearchServiceApplicationPipeBind> -Type <InclusionRule | ExclusionRule> [-AccountName <String>] [-AccountPassword <SecureString>] [-AssignmentCollection <SPAssignmentCollection>] [-AuthenticationType <DefaultRuleAccess | NTLMAccountRuleAccess | BasicAccountRuleAccess | CertificateRuleAccess | FormRuleAccess | CookieRuleAccess | AnonymousAccess>] [-Confirm [<SwitchParameter>]] [-ContentClass <String>] [-CrawlAsHttp <$true | $false>] [-FollowComplexUrls <$true | $false>] [-IsAdvancedRegularExpression <$true | $false>] [-PluggableSecurityTimmerId <Int32>] [-Priority <Int32>] [-SuppressIndexing <$true | $false>] [-WhatIf [<SwitchParameter>]]

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

New-SPEnterpriseSearchCrawlRule -SearchApplication mySearchServiceApp -Identity http://ExampleSharePointSite -CrawlAsHttp 1 -Type InclusionRule

This example creates an inclusion type crawl rule for the site at http://ExampleSharePointSite. The rule specifies that the site be crawled as an HTTP site.

The New-SPEnterpriseSearchCrawlRule cmdlet creates special rules for crawling items that are contained in the specified path.

 

Parameter Required Type Description

Path

Required

System.String

Specifies a unique path to which a crawl rule applies.

SearchApplication

Required

Microsoft.Office.Server.Search.Cmdlet.SearchServiceApplicationPipeBind

Specifies the Search application that is associated with the crawl rule to be modified.

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

Microsoft.Office.Server.Search.Administration.CrawlRuleType

Specifies the type of crawl rule. A value of zero (0) includes the rule, a value of 1 excludes the rule.

AccountName

Optional

System.String

Specifies the account to use when applying the crawl rule.

AccountPassword

Optional

System.Security.SecureString

Specifies the account to use when applying the crawl rule.

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.

NoteNote:
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.

AuthenticationType

Optional

Microsoft.Office.Server.Search.Administration.CrawlRuleAuthenticationType

Specifies one of the following authentication types to access matching URLs:

BasicAccountRuleAccess — Specifies the account name and password that are required for this authentication type.

CertificateRuleAccess — Specifies the valid client certificate name that is required for this authentication type.

NTLMAccountRuleAccess — Specifies the account name for integrated authentication.

FormRuleAccess — Specifies a valid URL for HTTP POST or HTTP GET, public and private parameters, and a list of error pages that are used by this authentication type.

CookieRuleAccess — Specifies private parameters and a list of error pages that are used by this authentication type.

AnonymousAccess— Specifies that the matching URLs have to be accessed anonymously.

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

ContentClass

Optional

System.String

Specifies the string that is sent to the protocol handler for any content that matches the crawl rule.

CrawlAsHttp

Optional

System.Boolean

Specifies whether the crawler should crawl content from a hierarchical content source as HTTP content.

FollowComplexUrls

Optional

System.Boolean

Specifies whether the index engine should crawl content with URLs that contain a question mark (?).

IsAdvancedRegularExpression

Optional

System.Boolean

Specifies whether the rule has a full regular expression syntax.

The default value is False.

PluggableSecurityTimmerId

Optional

System.Int32

PARAMVALUE: Int32

Priority

Optional

System.Int32

Defines where in the list of crawl rules this crawl rule should be applied.

The priority value cannot be less than 0 or greater than or equal to the number of crawl rules for the search application.

SuppressIndexing

Optional

System.Boolean

Specifies whether the crawler should exclude the content of items that this rule applies to from the content index.

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

PluggableSecurityTrimmerId

Optional

System.Nullable

Specifies the ID of the custom pluggable security trimmer to use, if registered.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft