I have written a series of blog posts where I have shared detail on Installation and configuration of SharePoint 2016 and also for WFEs. In this blog I am sharing PowerShell cmdlets to setup the Search Service for newly created SharePoint farm. Use a new Application Pool for setting up Search Service and name it “SearchService ApplicationPool”

Run the following PowerShell on the web front end that does not run distributed cache (WFE Server).

Provision the SharePoint Search service application in order to name the database according to the preferred naming convention.

$AppPool = Get-SPServiceApplicationPool –Identity “Search app pool name”
$ServerName = (Get-ChildItem env:computername).Value
$ServiceAppName = “Search Service”
$DatabaseName = “SP_SearchService”
Start-SPEnterpriseSearchServiceInstance $ServerName
Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $ServerName

$App = New-SPEnterpriseSearchServiceApplication -Name $ServiceAppName -ApplicationPool $AppPool -DatabaseName $DatabaseName
New-SPEnterpriseSearchServiceApplicationProxy -Name “$ServiceAppName Proxy” -SearchApplication $App

$clone = $App.ActiveTopology.Clone()
$Instance = Get-SPEnterpriseSearchServiceInstance
New-SPEnterpriseSearchAdminComponent –SearchTopology $clone -SearchServiceInstance $Instance
New-SPEnterpriseSearchContentProcessingComponent –SearchTopology $clone -SearchServiceInstance $Instance
New-SPEnterpriseSearchAnalyticsProcessingComponent –SearchTopology $clone -SearchServiceInstance $Instance
New-SPEnterpriseSearchCrawlComponent –SearchTopology $clone -SearchServiceInstance $Instance
New-SPEnterpriseSearchIndexComponent –SearchTopology $clone -SearchServiceInstance $Instance
New-SPEnterpriseSearchQueryProcessingComponent –SearchTopology $clone -SearchServiceInstance $Instance

You can also create it through Central admin by going through Service Applications and create new Search Service application:

SharePoint 2016 Search Service Application

Adnan is six time Microsoft MVP (Since 2015) with over 16 years of extensive experience with major expertise on SharePoint, SharePoint based development, Microsoft 365, Microsoft Teams, .Net Platform and Microsoft BI. He is currently working Sr Microsoft Consultant at Olive + Goose. He is MCT Regional Lead for Pakistan Chapter since 2012. He is working on SharePoint for past 12 years and worked on different intranet/intranet solutions for private & govt. sector majorly in United states and Gulf region and have experience of working with multiple Fortune 500 companies. He is a trainer, technology evangelist and also speaks in community forums.

Leave a Reply