Export (0) Print
Expand All
Expand Minimize

Set-SPEnterpriseSearchResultSource

SharePoint 2013
 

Topic Last Modified: 2014-06-25

Sets properties of a result source.

Set-SPEnterpriseSearchResultSource -Identity <ResultSourcePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-AuthenticationType <Anonymous | LocalNTAuth | SingleAccountBasicAuth | SingleAccountFormsAuthentication | SingleAccountCookie | ApplicationPoolIdentity | Kerberos | PerUserFormsAuthentication | PerUserCookie | SSO | SingleAccountNTLM | PerUserNTLM | SingleAccountDigest | PerUserDigest | PerUserBasicAuth | Custom | PerUserCustom>] [-AutoDiscover <$true | $false>] [-Confirm [<SwitchParameter>]] [-Description <String>] [-MakeDefault <$true | $false>] [-Name <String>] [-Owner <SearchObjectOwner>] [-Password <String>] [-ProviderId <Guid>] [-QueryTemplate <String>] [-RemoteUrl <String>] [-SearchApplication <SearchServiceApplicationPipeBind>] [-SsoId <String>] [-UserName <String>] [-WhatIf [<SwitchParameter>]]

--------EXAMPLE 1------

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application"
$owner = Get-SPEnterpriseSearchOwner -Level SSA
$customResultSource = New-SPEnterpriseSearchResultSource -SearchApplication $ssa -Owner $owner -ProviderId fa947043-6046-4f97-9714-40d4c113963d -Name "Custom SharePoint Result Source"
Set-SPEnterpriseSearchResultSource -Identity $customResultSource -Name "Basic SharePoint Result Source"

This example updates the description of the result source, and the identity of the result source is specified by name.

--------EXAMPLE 2------

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application"
$owner = Get-SPEnterpriseSearchOwner -Level SSA
$customResultSource = New-SPEnterpriseSearchResultSource -SearchApplication $ssa -Owner $owner -ProviderId fa947043-6046-4f97-9714-40d4c113963d -Name "Custom SharePoint Result Source"
Set-SPEnterpriseSearchResultSource -SearchApplication $ssa -Owner $owner -Identity "Custom SharePoint Result Source" -Description "A custom SharePoint Result Source for demonstration purposes"

This example updates the description of the result source, and the identity of the result source is specified by name.

This cmdlet updates properties of a user-created result source. This cmdlet supports the same update operations as are supported through the "Manage Result Sources" page in the SharePoint Central Administration website. The result source cannot be a built-in source (a built-in source has the BuiltIn property set to true) for any update operation other than changing the default result source using the MakeDefault parameter.

 

Parameter Required Type Description

Identity

Required

Microsoft.Office.Server.Search.Cmdlet.ResultSourcePipeBind

Specifies the result source to update. The type must be a valid GUID string, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a result source (for example, "Custom SharePoint Result Source"); or an instance of a valid Source object.

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

Specifies an authentication type for the result source. If parameter is not changed, the value is unchanged.A specific set of authentication types are supported for each search provider type and, if parameter is not specified, the authentication type will default based on search provider type. This cmdlet supports the following set of authentication mechanisms and corresponding types: Default SharePoint Authentication (FederationAuthType.LocalNTAuth), Basic Authentication (FederationAuthType.SingleAccountBasicAuth - specify UserName and Password), Default Remote SharePoint Authentication (FederationAuthType.PerUserBasicAuth), Single Sign On (FederationAuthType.SSO - requires SsoId to be specified), Anonymous (FederationAuthType.Anonymous), Digest Authentication (FederationAuthType.SingleAccountDigest - specify UserName and Password), NTLM Application Pool Identity (FederationAuthType.ApplicationPoolIdentity), NTLM User Name and Password (FederationAuthType.SingleAccountNTLM - specify UserName and Password). When using a Local SharePoint Search/Local SharePoint People Search provider, then FederationAuthType.LocalNTAuth (default) and FederationAuthType.SingleAccountBasicAuth are supported. When using a Remote SharePoint Search/Remote SharePoint People Search provider, then FederationAuthType.PerUserBasicAuth (default) and FederationAuthType.SSO are supported. When using OpenSearch 1.0/1.1 search provider, then the following authentication types are supported: FederationAuthType.Anonymous (default), FederationAuthType.SingleAccountBasicAuth, FederationAuthType.SingleAccountDigest, FederationAuthType.SingleAccountNTLM, and FederationAuthType.ApplicationPoolIdentity.

AutoDiscover

Optional

System.Boolean

Specifies whether to use automatic discovery of the Exchange Server endpoint for the result source provider. Setting value to true ($true) states that automatic discovery should be used. If the parameter is not specified, the value is unchanged. Only applicable when using an Exchange search provider.

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

Description

Optional

System.String

Specifies a description for the result source. If the parameter is not specified, the value is unchanged.

MakeDefault

Optional

System.Boolean

Specifies whether the result source should be set as default result source or not, for the scope specified by the Owner parameter. If parameter is not specified, the default result source will not change. Setting value to true ($true) states that the result source should be set as default. Setting value to false ($false) states that the result source should not be set as default and, in this case, if the result source to update is currently the default, the original default result source (“Local SharePoint Results”) will be set as default again.Tip: Use instance, not name or GUID string Id, as Identity when using Makedefault, to clearly specify that Owner is only to be used for specifying the level where the result source should be set as default (if value is true) or where the default should be reset to original (if value is false).

Name

Optional

System.String

Specifies a name for the result source. If parameter is not specified, the value is unchanged. Names must be unique at each administrative level. For example, two result sources in a site cannot share a name, but one in a site and one provided by the site collection can.

Owner

Optional

Microsoft.Office.Server.Search.Administration.SearchObjectOwner

Specifies the search object owner that defines the scope at which the corresponding result source is available.

Password

Optional

System.String

Specifies the password of the user credentials to use to connect to the result source. If parameter is not specified, the value is unchanged. Used when authentication type (AuthenticationType) is set to a type that consumes user credentials (FederationAuthType.SingleAccountBasicAuth, FederationAuthType.SingleAccountDigest or FederationAuthType.SingleAccountNTLM).

ProviderId

Optional

System.Guid

Specifies a search provider to be used by the result source. If parameter is not specified, the value is unchanged. Is specified as a Guid or GUID string, which must be one of the following: FA947043-6046-4F97-9714-40D4C113963D (Local SharePoint Search), E4BCC058-F133-4425-8FFC-1D70596FFD33 (Local SharePoint People Search), 1E0C8601-2E5D-4CCB-9561-53743B5DBDE7 (Remote SharePoint Search), E377CAAA-FCAF-4a1b-B7A1-E69A506A07AA (Remote SharePoint People Search), 3A17E140-1574-4093-BAD6-E19CDF1C0122 (Exchange Search), 3A17E140-1574-4093-BAD6-E19CDF1C0121 (OpenSearch 1.0/1.1). FA947043-6046-4F97-9714-40D4C113963D (Local SharePoint Search), E4BCC058-F133-4425-8FFC-1D70596FFD33 (Local SharePoint People Search), 1E0C8601-2E5D-4CCB-9561-53743B5DBDE7 (Remote SharePoint Search), E377CAAA-FCAF-4a1b-B7A1-E69A506A07AA (Remote SharePoint People Search), 3A17E140-1574-4093-BAD6-E19CDF1C0122 (Exchange Search), 3A17E140-1574-4093-BAD6-E19CDF1C0121 (OpenSearch 1.0/1.1).

QueryTemplate

Optional

System.String

Specifies the query transformation template of the result source. If parameter is not specified, the value is unchanged. Incoming queries are changed according to the template, to use this new query text instead. Include the incoming query in the new text by using the query variable "{searchTerms}". Use this to scope results. For example, to only return OneNote items, set the new text to "{searchTerms} fileextension=one". Then, an incoming query "sharepoint" becomes "sharepoint fileextension=one". Default value is {searchTerms}.

RemoteUrl

Optional

System.String

Specifies a connection URL template for the result source. If parameter is not specified, the value is unchanged. Must be set when using a search provider that consumes it: Remote SharePoint Search, Remote SharePoint People Search, OpenSearch 1.0/1.1, and Exchange (if AutoDiscover is not turned on). When using other search providers the parameter is ignored. For Remote SharePoint Search/Remote SharePoint People Search, specify the address of the root site collection of the remote SharePoint farm. For OpenSearch 1.0/1.1, specify the URL of the OpenSearch source. Include the query in the URL by using the query variable "{searchTerms}", which will be automatically replaced with the query. For Exchange, specify the Exchange EWS URL from which to retrieve results.

SearchApplication

Optional

Microsoft.Office.Server.Search.Cmdlet.SearchServiceApplicationPipeBind

Specifies the search application. 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.

SsoId

Optional

System.String

Specifies the reverse proxy certificate Secure Store Id to use to connect to the result source. If parameter is not specified, the value is unchanged. Must be specified if authentication type (AuthenticationType) is set to FederationAuthType.SSO (Single Sign On). If you are connecting to your intranet through a reverse proxy, enter the SSO Id of the Single Sign On entry which stores the certificate used to authenticate against the reverse proxy.

UserName

Optional

System.String

Specifies the user name of the user credentials to use to connect to the result source. If parameter is not specified, the value is unchanged. Used when authentication type (AuthenticationType) is set to a type that consumes user credentials (FederationAuthType.SingleAccountBasicAuth, FederationAuthType.SingleAccountDigest or FederationAuthType.SingleAccountNTLM).

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

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