zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    JNI和NDK编程
    View的弹性滑动
    View的滑动
    《软件项目管理》课程
    《软件测试》课堂笔记05
    “MAVEN” 简单入门
    “Junit” 简单测试
    关于“百合测试”的实例
    关于“黑盒测试”的实例
    《软件测试》课堂笔记04
  • 原文地址:https://www.cnblogs.com/awpatp/p/2981015.html
Copyright © 2011-2022 走看看