I have a requirement to restore the search service application from the production environment to test server.

I am a bit confused with the below two command lets.

Restore-SPFarm -Directory -Item 'Farm\Shared Services' -Restoremethod-Overwrite


Restore-SPEnterpriseSearchServiceApplication -Name "SearchServiceApplication" -ApplicationPool $applicationPool -AdminSearchServiceInstance $searchInstance -DatabaseName "SearchServiceApplication_Admindb" -DatabaseServer "SQLServer1"

Could any one please elaborate the specific scenarios of the usage of the above two commands and which one is suitable for my requirement to restore the search application to different farm.

3 Answers 3


which one is suitable for my requirement to restore the search application to different farm

You should use the first cmdlet to restore a Search service application using PowerShell

Restore-SPFarm -Directory <BackupFolder> -Item "Farm\Shared Service Applications" -RestoreMethod Overwrite [-BackupId <GUID>] [-Verbose]

Note: When you restore a Search service application, it is automatically paused. To resume the Search service application when the restore has completed, type the following command:

$ssa = Get-SPEnterpriseSearchServiceApplication <SearchServiceApplicationName>

Check the detail steps at Restore Search service applications in SharePoint 2013

But if there are any third party tool that backs up the application data and has to restore the application later, in this case, you should use Restore-SPEnterpriseSearchServiceApplication to create a new search application that uses the restored data.so this is NOT suitable for your scenario

For more details check Restore-SPEnterpriseSearchServiceApplication

  • I tried restoration of search application using command 'Restore-SPFarm -Directory <BackupFolder> -Item "Farm\Shared Service Applications" -RestoreMethod Overwrite [-BackupId <GUID>] [-Verbose]' . I am getting the below error. "Restore-SPFarm : Item Farm\Shared Service Applications not found" Please suggest if any thing missed or any troubleshooting.
    – kumar
    Jan 2, 2018 at 10:57

The two commands can be both used to restore search service application.

If we use “Restore-SPFarm -Item”, we can restore the part of the backup package including the search service application. For more detailed information, refer to the article below.



The Restore-SPEnterpriseSearchServiceApplication command is used to restore search service application specially. For more detailed information, refer to the article below.




You can use the below command to restore

Restore-SPEnterpriseSearchServiceApplication -Name $serviceAppName -ApplicationPool $saAppPoolName -AdminSearchServiceInstance $searchInstance -DatabaseName $searchDBName

And the complete step by step to restore and setup a SSA using existing search db's available in the below blog


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.