共用方式為


Set-SPSearchService

 

適用版本: SharePoint Foundation 2010, SharePoint Server 2010

上次修改主題的時間: 2015-03-09

設定搜尋服務的屬性。

Syntax

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

詳細描述

Set-SPSearchService cmdlet 可修改 SearchService 物件屬性。

如需 Windows PowerShell for SharePoint Foundation 2010 的權限及最新資訊,請參閱 TechNet (https://go.microsoft.com/fwlink/?LinkId=163184)。

Parameters

參數 必要 輸入 描述

Identity

選擇性

Microsoft.SharePoint.Search.Cmdlet.SPSearchServicePipeBind

指定要設定的搜尋服務執行個體。

此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID;有效之搜尋服務執行個體的名稱 (例如 SearchServiceInstance1);或有效之 SearchServiceInstance 物件的執行個體。

AddStartAddressForNonNTZone

選擇性

System.String

指定新增不具有 Windows NT zone 的 Web 應用程式起始位址。

AssignmentCollection

選擇性

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

為能適當處置物件而管理物件。使用 SPWebSPSite 等物件可能會耗用大量的記憶體,因此在 Windows PowerShell 指令碼中使用這些物件時,必須適當地管理記憶體。您可以使用 SPAssignment 物件將物件指派給變數,並在不需要時處置這些物件,以釋放記憶體。使用 SPWebSPSiteSPSiteAdministration 物件時,若未使用指派集合或 Global 參數,將會自動處置這些物件。

注意

使用 Global 參數時,所有物件會包含在全域儲存區內。若未立即使用物件,或未使用 Stop-SPAssignment 命令處置物件,將會發生記憶體不足的狀況。

CrawlAccount

選擇性

System.String

指定用於編目的使用者帳戶或服務帳戶。

此類型必須是有效的管理者帳戶,例如 MyAdminAcct1。

CrawlPassword

選擇性

System.Security.SecureString

提供於 CrawlAccount 中指定的服務帳戶密碼。

此類型必須是有效的密碼,例如 UserIDPassword。

MaxBackupDuration

選擇性

System.String

指定時間間隔 (以分為單位),始於搜尋服務之 Microsoft SharePoint Foundation 2010 內容索引的備份作業開始至此搜尋服務重新開始。

PerformanceLevel

選擇性

System.String

指定索引器效能相關的執行緒數量:

Reduced:執行緒總數 = 處理器數量,執行緒數/主機上限 = 處理器數量。

PartlyReduced:執行緒總數 = 4 倍處理器數量,執行緒/主機上限 = 16 倍處理器數量。

Maximum:執行緒總數=處理器數量。

此類型必須是下列其中一個值:ReducedPartlyReducedMaximum

輸入類型

傳回類型

Example

--------------------範例--------------------

Set-SPSearchService -MaxBackupDuration 120

此範例會設定搜尋服務的備份作業開始與搜尋服務重新開始之間的上限時間 (以分為單位)。

See Also

Reference

Get-SPSearchService
Get-SPSearchServiceInstance
Set-SPSearchServiceInstance