SharePoint 2013中移除原有的Content Processing Component并添加一个新的

笔者在自己的SharePoint 2013中测试通过了以下脚本.

#Get Search Service Application and its active topology.
$ssa = Get-SPEnterpriseSearchServiceApplication
$currentActiveTopo = Get-SPEnterpriseSearchTopology -SearchApplication $ssa | Where-Object {$_.State -eq "Active"}

#Get the Search Service started on new machine.
$hostPass = Get-SPEnterpriseSearchServiceInstance -Identity "PASSTHROUGH"
Start-SPEnterpriseSearchServiceInstance -Identity $hostPass
#Test if the service is up.
Get-SPEnterpriseSearchServiceInstance -Identity $hostPass

#Clone the topology.
$clone = New-SPEnterpriseSearchTopology -Clone -SearchApplication $ssa -SearchTopology $currentActiveTopo 
#Get current content processing component.
$searchComs = Get-SPEnterpriseSearchComponent -SearchTopology $clone -SearchApplication $ssa
$ctsComponent = $searchComs | Where-Object {$_.Name -eq "ContentProcessingComponent1"}

#Remove current CTS component.
$clone.RemoveComponent($ctsComponent)

#Create a new CTS component on the new server.
New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $clone -SearchServiceInstance $hostPass

#Activate the new search topology
Set-SPEnterpriseSearchTopology -Identity $clone

#Verify that the new search topology is act
Get-SPEnterpriseSearchTopology -SearchApplication $ssa

#Verify that all components of the new search topology are running correctly
Get-SPEnterpriseSearchStatus -SearchApplication $ssa -Text 

效果

image

 

参考资料

===============

ISearchTopology.RemoveComponent method

http://msdn.microsoft.com/en-us/library/sharepoint/microsoft.office.server.search.administration.topology.isearchtopology.removecomponent%28v=office.15%29

posted on 2013-03-25 16:39  中道学友  阅读(379)  评论(0编辑  收藏  举报

导航

技术追求准确,态度积极向上