Restore-SPEnterpriseSearchServiceApplication
還原協力廠商的搜尋應用程式備份。
Syntax
Restore-SPEnterpriseSearchServiceApplication
[-Name] <String>
-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>
-AdminSearchServiceInstance <SearchServiceInstancePipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
-DatabaseName <String>
[-DatabasePassword <SecureString>]
-DatabaseServer <String>
[-DatabaseUsername <String>]
[-FailoverDatabaseServer <String>]
[-WhatIf]
[<CommonParameters>]
Restore-SPEnterpriseSearchServiceApplication
[-Name] <String>
-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
[-KeepId]
[-WhatIf]
-TopologyFile <String>
[-DeferUpgradeActions]
[<CommonParameters>]
Description
此 Cmdlet 包含一個以上的參數集。
您可能只會使用到一個參數集中的參數,而且您無法合併不同參數集中的參數。 如需如何使用參數集的詳細資訊,請參閱 Cmdlet 參數集。
此 Cmdlet 可供協力廠商用於建立使用現有資料的搜尋應用程式。
有些協力廠商會備份應用程式資料,並在稍後還原應用程式。 因此,資料會還原並使用 Restore-SPEnterpriseSearchServiceApplication
Cmdlet 以建立使用還原資料的新搜尋應用程式。
此 Cmdlet 支援參數集。
第一個參數集適用於應用程式設定連結模式,第二個參數集則適用於搜尋應用程式連結模式。
應用程式設定附加模式僅還原儲存於系統管理資料庫中的設定資料。 不過,[搜尋應用程式附加] 會還原設定、拓撲及所有已編目的資料。
如需適用於 SharePoint 產品的 Windows PowerShell 權限及最新資訊,請參閱位於 SharePoint Server Cmdlets 的線上文件。
範例
----------------------範例 1-----------------------
$searchInstance = Get-SPEnterpriseSearchServiceInstance -local
$applicationPool = New-SPServiceApplicationPool -Name "SearchServiceApplicationPool" -Account "domain\username"
Restore-SPEnterpriseSearchServiceApplication -Name "SearchServiceApplication" -ApplicationPool $applicationPool -AdminSearchServiceInstance $searchInstance -DatabaseName "SearchServiceApplication_Admindb" -DatabaseServer "SQLServer1"
此範例會使用應用程式設定附加模式還原設定資料。
----------------------範例 2-----------------------
$applicationPool = New-SPServiceApplicationPool -Name "SearchServiceApplicationPool" -Account "domain\username"
Restore-SPEnterpriseSearchServiceApplication -Name "SearchServiceApplication" -ApplicationPool $applicationPool -TopologyFile "C:\TopologyFile.xml"
此範例會使用搜尋應用程式連結模式還原檔名為 topology.xml 檔案中的拓撲資料。
參數
-AdminSearchServiceInstance
指定要與系統管理元件並用的搜尋服務執行個體。
Type: | SearchServiceInstancePipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ApplicationPool
指定查詢 Web 服務的應用程式集區。
Type: | SPIisWebServiceApplicationPoolPipeBind |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-AssignmentCollection
管理物件以適當處置它們。 使用 SPWeb 或 SPSite 等物件可能會耗用大量的記憶體,因此在 Windows PowerShell 指令碼中使用這些物件時,必須適當地管理記憶體。 您可以使用 SPAssignment 物件將物件指派給變數,並在不需要時處置這些物件,以釋放記憶體。 使用 SPWeb、SPSite 或 SPSiteAdministration 物件時,若未使用指派集合或 Global 參數,將會自動處置這些物件。
使用 Global 參數時,所有物件會包含在全域儲存區內。
如果不立即使用物件,或使用 Stop-SPAssignment
命令加以捨棄,則可能會有記憶體不足的狀況發生。
Type: | SPAssignmentCollection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Confirm
在執行命令之前,提示您確認操作。
如需詳細資訊,請輸入下列命令:get-help about_commonparameters
。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DatabaseName
指定要建立用以還原搜尋應用程式之資料庫的名稱。
此類型必須是有效的 SQL Server 資料庫名稱,例如 RestoreDB1。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DatabasePassword
指定 SQL Server 上之資料庫伺服器的密碼名稱。
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DatabaseServer
指定 DatabaseName 中指定之資料庫的主機伺服器名稱。
此類型必須是有效的 SQL Server 主機名稱,例如 SQLServerHost1。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DatabaseUsername
指定 Database Server 參數中所指定的帳戶名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DeferUpgradeActions
防止資料庫架構在還原期間進行更新。 請勿使用。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2016, SharePoint Server 2019 |
-FailoverDatabaseServer
若要管理資料庫以使用容錯移轉資料庫伺服器,可使用此參數。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-KeepId
指定還原的 Search Service 應用程式是否應該使用拓撲 .xml 檔案中的 Search Service 應用程式識別碼。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Name
指定新的搜尋應用程式名稱。
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-TopologyFile
指定包含應用程式拓撲資訊之 .XML 檔案的路徑。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-WhatIf
顯示訊息會描述命令的功效而不執行命令。
如需詳細資訊,請輸入下列命令:get-help about_commonparameters
。
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |