Friday, March 10, 2017

SharePoint 2013: create Search service for single-server dev farm


This procedure deploys a Search Service Application to a single-server SharePoint Server 2013 Enterprise farm primarily used by a SharePoint developer who also needs Search capability. The server has just one drive, the system drive.   It also leaves the crawl default, or the Search service account, but you can always change this later through Central Administration.


To get started, you first need to collate the values for some standard parameters:
Parameter ValueComment
$svr devserver name
$SvcAcct DOMAIN\spSearchSearch service identity
$SSAName Search ServiceSearch service name
$DBPrefix Search_search service database name prefix
$IndexLocation C:\SSAIndexpath to the location of the index
Once you have these constants defined, open an elevated SharePoint Shell and execute the following script:
$Svr = "dev" $SvcAcct = DOMAIN\spSearch $AdminAcct = Get-SPManagedAccount -Identity $SvcAcct $QueryAcct = $AdminAcct $SSAName = "Search Service" $DBPrefix = "Search_" $IndexLocation = "C:\SSAIndex" $SSISvr = get-SPServiceInstance -server $Svr |?{$_.TypeName -eq "SharePoint Server Search"} $err = $null Start-SPEnterpriseSearchServiceInstance -Identity $SSISvr $AdminAppPool = new-SPServiceApplicationPool -name $SSAName"_AppPool" -account $AdminAcct  $QueryAppPool = $AdminAppPool $SearchApp = New-SPEnterpriseSearchServiceApplication -Name $SSAName -applicationpool $AdminAppPool -databasename $DBPrefix"_AdminDB" $SSAProxy = new-spenterprisesearchserviceapplicationproxy -name $SSAName" ApplicationProxy" -SearchApplication $SearchApp $SearchTopology = $SearchApp.ActiveTopology.Clone() New-SPEnterpriseSearchAdminComponent -SearchServiceInstance $SSISvr -SearchTopology $SearchTopology New-SPEnterpriseSearchContentProcessingComponent -SearchServiceInstance $SSISvr -SearchTopology $SearchTopology New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchServiceInstance $SSISvr -SearchTopology $SearchTopology New-SPEnterpriseSearchCrawlComponent -SearchServiceInstance $SSISvr -SearchTopology $SearchTopology New-SPEnterpriseSearchIndexComponent -SearchServiceInstance $SSISvr -SearchTopology $SearchTopology -RootDirectory $IndexLocation New-SPEnterpriseSearchQueryProcessingComponent -SearchServiceInstance $SSISvr -SearchTopology $SearchTopology $SearchTopology.Activate()

That's it. You're done. Now you can fire up Central Administration, navigate to Farm Search Administration and see everything.



  • If you need to remove the Search service application, be sure to review the reference on completely removing it as it provides helpful steps to ensure you get all of it off the server before trying to re-install it again.

No comments: