Modifying SharePoint 2013 Search Service Topology All At Once

Its a routine work that we have to create/configure SharePoint Service Applications and Search Service Application is one of the major service that takes time after creation for configuration. Mostly there are three tier architecture where we customize SharePoint Search Service Topology in order to make it more stable, available and quick for content processing. In SharePoint 2010 it was simple through UI but in SharePoint 2013 you can do all of this stuff using PowerShell.

In my case, i have 2 APP servers, 2 WFE servers and 1 DB server. Below is the PowerShell script where you can replace your servers names only and get your Search Topology configured like my farm. Putting end result screenshot of my Search Topology. My APP01 server is the Central Administration server.


Note: Make sure your Search Service Application has been started on all target servers. You can use below command for each server to start the service.




$ssa = Get-SPEnterpriseSearchServiceApplication
$active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active
$clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone SearchTopology $active

$wfe1 = Get-SPEnterpriseSearchServiceInstance -Identity "MY-WFE01"
$wfe2 = Get-SPEnterpriseSearchServiceInstance -Identity "MY-WFE02"
$App2 = Get-SPEnterpriseSearchServiceInstance -Identity "MY-APP02"

#Add MY-APP02 Server as Admin, Crawl, Content Processing and Analytic Processing Component
New-SPEnterpriseSearchAdminComponent -SearchTopology $clone -SearchServiceInstance $App2
New-SPEnterpriseSearchCrawlComponent -SearchTopology $clone -SearchServiceInstance $App2
New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $clone -SearchServiceInstance $App2
New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $clone -SearchServiceInstance $App2

#Add MY-WFE01 as QueryProcessing And IndexComponent 
New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $clone -SearchServiceInstance $wfe1
New-SPEnterpriseSearchIndexComponent SearchTopology $clone -SearchServiceInstance $wfe1 -IndexPartition 0

#Add MY-WFE02 as QueryProcessing And IndexComponent 
New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $clone -SearchServiceInstance $wfe2
New-SPEnterpriseSearchIndexComponent SearchTopology $clone -SearchServiceInstance $wfe2 -IndexPartition 0

#Remove MY-APP01 from Index Component
$indexComponent = (Get-SPEnterpriseSearchComponent -SearchTopology $clone -Identity IndexComponent1)
#To verify that you have correct server, type $indexComponent on PowerShell now and verify server name
Remove-SPEnterpriseSearchComponent -Identity $indexComponent.componentID.GUID -SearchTopology $clone -confirm:$false

#Remove MY-APP01 from QueryProcessing Component
$queryComponent = (Get-SPEnterpriseSearchComponent -SearchTopology $clone -Identity QueryProcessingComponent1)
#To verify that you have correct server, type $queryComponent on PowerShell now and verify server name
Remove-SPEnterpriseSearchComponent -Identity $queryComponent.componentID.GUID -SearchTopology $clone -confirm:$false

Set-SPEnterpriseSearchTopology -Identity $clone

Comments

Popular Posts

GREYCstoration Oil Paint plugin for Photoshop

Service Bus Gateway service stuck at Starting

PowerApps SubmitForm not clearing People Picker value

Apple iPhone sending SMS automatically 00447786205094

SharePoint online hub navigation not updating for other users