Monday, March 14, 2016



Configuring a 3 server search application (SharePoint 2013)




Assuming we have 3 servers in the Farm

NKRWEB1 - Web Server 1  ( WFE one used specifically as web front end )
NKRApp1 - App Server 1  ( We will configure Admin, Crawl, ContentProcessing, Analytics Processing on this server)
NKRIND1 - Index Server 1( We will configure Query Processing and Index Component on this server, Index component on a non system drive)




*** Open SharePoint management console on the App server NKRApp1 ***
--------------------------------------------------------------------------------------------
# Get App Pool - Get the specific Application Pool.
$saAppPoolName = "UAT_ServiceApps_Pool"

# Since we are running on the App1 server the computername will be NKRApp1
$searchServerName = (Get-ChildItem env:computername).value

#Below is the search service application name, So do follow a naming convention if you have any
$serviceAppName = "Search Service Application"

#Below is the search service application database name, naming convention if you have any
$searchDBName = "UAT_Search_Service_DB"

# Grab the Appplication Pool for Service Application Endpoint
$saAppPool = Get-SPServiceApplicationPool $saAppPoolName

# Start Search Service Instances
Start-SPEnterpriseSearchServiceInstance $searchServerName
Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $searchServerName

# Create the Search Service Application and Proxy
$searchServiceApp = New-SPEnterpriseSearchServiceApplication -Name $serviceAppName -ApplicationPool $saAppPoolName -DatabaseName $searchDBName
$searchProxy = New-SPEnterpriseSearchServiceApplicationProxy -Name "$serviceAppName Proxy" -SearchApplication $searchServiceApp

#We will no add the index server
$hostB = Get-SPEnterpriseSearchServiceInstance -Identity "NKRIND1"
Start-SPEnterpriseSearchServiceInstance -Identity $hostB


#Our search application will have two servers but running different search components.
$host1 = Get-SPEnterpriseSearchServiceInstance -Identity "NKRAPP1"
$host2 = Get-SPEnterpriseSearchServiceInstance -Identity "NKRIND1"


Start-SPEnterpriseSearchServiceInstance -Identity $host1
Start-SPEnterpriseSearchServiceInstance -Identity $host2



Get-SPEnterpriseSearchServiceInstance -Identity $host1
Get-SPEnterpriseSearchServiceInstance -Identity $host2


$ssa = Get-SPEnterpriseSearchServiceApplication
$newSearchTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa
$ssa
$activeTopology

#***Create search components and assign to the respective servers TWO SERVERs***

#Assigning Admin, Crawl, Content Processing and Analytics Processing Component to NKRApp1 Server

New-SPEnterpriseSearchAdminComponent -SearchTopology $newSearchTopology -SearchServiceInstance $host1
New-SPEnterpriseSearchCrawlComponent -SearchTopology $newSearchTopology -SearchServiceInstance $host1
New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $newSearchTopology -SearchServiceInstance $host1
New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $newSearchTopology -SearchServiceInstance $host1


#Assigning Query Processing and Index Component to NKRIND1 Server
New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $newSearchTopology -SearchServiceInstance $host2
New-SPEnterpriseSearchIndexComponent -SearchTopology $newSearchTopology -IndexPartition 0 -SearchServiceInstance $host2 -RootDirectory "D:\UAT_Indexes"


$ssa = Get-SPEnterpriseSearchServiceApplication
Set-SPEnterpriseSearchTopology -Identity $newSearchTopology
$activeTopology

No comments: