Get-SPSearchService
Example
[image]

Returns a search service.

Get-SPSearchService [-AssignmentCollection <SPAssignmentCollection>]

Parameters

Parameter Required Type Description

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.

Detailed Description

Use the Get-SPSearchService cmdlet to read the SPSearch object when updating a search service.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

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

Copy Code
Get-SPSearchService

This example displays the search service.
Click here to submit feedback on this topic.


Get-SPSearchServiceInstance
Example
[image]

Returns an instance of a search service.

Get-SPSearchServiceInstance [-Identity <SPSearchServiceInstancePipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Local <SwitchParameter>]

Parameters

Parameter Required Type Description

Identity

Optional

Microsoft.SharePoint.Search.Cmdlet.SPSearchServiceInstancePipeBind

The search service to update.

A valid GUID, such as "12345678-90ab-cdef-1234-567890bcdefgh", or a valid name of a search service, such as "MySearch1", or an instance a valid SearchService 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.

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.

Local

Optional

System.Management.Automation.SwitchParameter

Specify to return the search service instance for the current search server.

Detailed Description

Use the Get-SPSearchServiceInstance cmdlet to read a SPSearchServiceInstance object when updating an instance of a search service running on one or more servers in the server farm.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

--------------EXAMPLE--------------
Copy Code
Get-SPSearchServiceInstance -Identity MySearch1 -Local

This example updates the search service instance named, MySearch1 on the local search server.
Click here to submit feedback on this topic.


Set-SPSearchService
Example
[image]

Sets properties of a search service.

Set-SPSearchService [-Identity <SPSearchServicePipeBind>] [-AddStartAddressForNonNTZone <String>] [-AssignmentCollection <SPAssignmentCollection>] [-CrawlAccount <String>] [-CrawlPassword <SecureString>] [-MaxBackupDuration <String>] [-PerformanceLevel <String>]

Parameters

Parameter Required Type Description

Identity

Optional

Microsoft.SharePoint.Search.Cmdlet.SPSearchServicePipeBind

The search service instance to set.

A valid GUID, such as "12345678-90ab-cdef-1234-567890bcdefgh", or a valid name of a search service instance, such as "SearchServiceInstance1", or an instance a valid SearchServiceInstance object

AddStartAddressForNonNTZone

Optional

System.String

Specify to add start address for Web applications that do not have Win NT zone.

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.

CrawlAccount

Optional

System.String

The user account or service account to use for crawling.

A valid administrator account, such as "MyAdminAcct1"

CrawlPassword

Optional

System.Security.SecureString

Password for the service account specified in CrawlAccount.

A valid password, such as <"UserIDPassword">.

MaxBackupDuration

Optional

System.String

The interval, in minutes, from the time the backup operation started for the search service in Windows SharePoint Services content index, and when the search services will resume.

PerformanceLevel

Optional

System.String

Specify the relative number of threads for the indexer performance:

Reduced: Total number of threads = number of processors, Max Threads/host = number of processors

Partly Reduced: Total number of threads = 4 times the number of processors , Max Threads/host = 16 times the number of processors

Maximum: Total number of threads = number of processors

Any of the following: Reduced, PartlyReduced, Maximum

Detailed Description

Use the Set-SPSearchService cmdlet to modify the SearchService object properties.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

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

Copy Code
Set-SPSearchService -MaxBackupDuration 120

This example sets a schedule for when a backup process for search services will resume.
Click here to submit feedback on this topic.


Set-SPSearchServiceInstance
Example
[image]

Sets properties of a search service instance.

Set-SPSearchServiceInstance -Identity <SPSearchServiceInstancePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-ProxyType <String>]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.SharePoint.Search.Cmdlet.SPSearchServiceInstancePipeBind

The search service instance to set.

A valid GUID, such as "12345678-90ab-cdef-1234-567890bcdefgh", or a valid name of a search service instance, such as "SearchServiceInstance1", or an instance a valid SearchServiceInstance 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.

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.

ProxyType

Optional

System.String

Defines whether crawler uses default, direct, or proxy connection parameters. Valid values are default, direct, proxy. The default value is "default".

A valid name of a proxy type, such as "default"

Detailed Description

Use the Set-SPSearchServiceInstance cmdlet to modify the SearchServiceInstance.

Input Types

Return Types

Errors

Error | Description

Exceptions

Exceptions | Description

Example

------------EXAMPLE---------------
Copy Code
Set-SPSearchServiceInstance -ProxyType proxy

This example sets the proxy type to "proxy".
Click here to submit feedback on this topic.