For different reasons, there are times an admin will like to move SharePoint Search component around.
The different component in the Search Service can be allocated to different application servers if you have more than one. This will help to balance the use of resources on those system. This is applicable if you already have a healthy working search topology.
To start with, run the following command get your Search service application instantiated
$ssa = Get-SPEnterpriseSearchServiceApplication
"Search Service Application"
$instance=Get-SPEnterpriseSearchServiceInstance
-Local
$current=Get-SPEnterpriseSearchTopology
-SearchApplication $ssa
$clone=New-SPEnterpriseSearchTopology -Clone
-SearchApplication $ssa -Se
archTopology $current
$active = Get-SPEnterpriseSearchTopology
-SearchApplication $ssa -Active
Then go ahead and clone the existing topology
$clone = New-SPEnterpriseSearchTopology
-SearchApplication $ssa -Clone -
SearchTopology $active
Then instantiate the new server (destination)
$NewServer =
Get-SPEnterpriseSearchServiceInstance -Identity serverName
Start-SPEnterpriseSearchServiceInstance -Identity
$NewServer
You can then type
Get-SPEnterpriseSearchServiceInstance -Identity
$NewServer
to get the details of the new server
TypeName :
SharePoint Server Search
Description : Index content and serve search queries
Id :
aa423eaf-2701-435f-9a7b-86a3cc76f492
Server : SPServer
Name=xxxxxxxxxx
Service :
SearchService Name=OSearch15
Role : None
Status :
Provisioning
Wait for the status to change to Online...
Get-SPEnterpriseSearchServiceInstance -Identity
$NewServer
TypeName :
SharePoint Server Search
Description : Index content and serve search queries
Id :
aa423eaf-2701-435f-9a7b-86a3cc76f492
Server : SPServer
Name=SW44GFCPSPA02
Service :
SearchService Name=OSearch15
Role : None
Status : Online
Then create a new clone...
New-SPEnterpriseSearchQueryProcessingComponent
-SearchTopology $clone -S
earchServiceInstance $NewServer
ComponentId : 0cf68d0f-6faa-4587-b4d4-0b29e87e49c3
TopologyId :
8a1d4f33-bc37-4677-909a-2ddd5cfd7ff7
ServerId :
dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name :
QueryProcessingComponent2
ServerName : xxxxxxxxxxx
e -SearchServiceInstance $NewServer
NumProcessingTasksInParallel : 4
MaxSortMemoryInMB
: 40
ComponentId
: 1231bd2c-d41b-4e47-9ef2-69330ee2fdb9
TopologyId
: 8a1d4f33-bc37-4677-909a-2ddd5cfd7ff7
ServerId
: dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name
: AnalyticsProcessingComponent2
ServerName
: xxxxxxxxxxxxxxx
New-SPEnterpriseSearchContentProcessingComponent
-SearchTopology $clone
-SearchServiceInstance $NewServer
ComponentId : 14af5bbf-510d-4e90-80bd-ead4c2691f11
TopologyId :
8a1d4f33-bc37-4677-909a-2ddd5cfd7ff7
ServerId :
dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name :
ContentProcessingComponent2
ServerName : xxxxxxxxxx
New-SPEnterpriseSearchIndexComponent
-SearchTopology $clone -IndexPartit
ion 0 -SearchServiceInstance $NewServer -RootDirectory
G:\SearchIndex
IndexPartitionOrdinal : 0
RootDirectory
: G:\SearchIndex
ComponentId
: 16fdcf14-6b91-453b-945e-3c1d1a60da2c
TopologyId
: 8a1d4f33-bc37-4677-909a-2ddd5cfd7ff7
ServerId
: dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name
: IndexComponent2
ServerName
: xxxxxxxxxx
Set-SPEnterpriseSearchTopology -Identity $clone
New-SPEnterpriseSearchCrawlComponent
-SearchTopology $clone -SearchServi
ceInstance $NewServer
New-SPEnterpriseSearchCrawlComponent : Cannot make changes
to topology in :
Active state
At line:1 char:1
+ New-SPEnterpriseSearchCrawlComponent -SearchTopology
$clone
-SearchServiceInstan ...
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
+
CategoryInfo : InvalidData:
(Microsoft.Offic...hCrawlComponent:
NewSearchCrawlComponent) [New-SPEnterpriseSearchCrawlComponent],
InvalidTo
pologyException
+
FullyQualifiedErrorId : Microsoft.Office.Server.Search.Cmdlet.NewSearchC
rawlComponent
$ssa = Get-SPEnterpriseSearchServiceApplication
$active = Get-SPEnterpriseSearchTopology
-SearchApplication $ssa -Active
$clone = New-SPEnterpriseSearchTopology
-SearchApplication $ssa -Clone -
SearchTopology $active
Get-SPEnterpriseSearchComponent -SearchTopology
$clone
ComponentId : 9d9c00c2-5a12-4745-99ff-c9d9c1cd3bab
TopologyId :
c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId :
dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name :
QueryProcessingComponent2
ServerName : xxxxxxxxxxxxxxx
IndexPartitionOrdinal : 0
RootDirectory
:
ComponentId
: 45878228-c344-4f9f-91e7-e4007f98e194
TopologyId
: c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId
: 9e6002af-412c-4454-b761-3f01474d32be
Name
: IndexComponent1
ServerName : xxxxxxxxxxxx
ComponentId : fd7b9f08-8c98-40db-8a89-f25c46f04e12
TopologyId :
c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId :
9e6002af-412c-4454-b761-3f01474d32be
Name :
AdminComponent1
ServerName : xxxxxxxxxxxxxx
ComponentId : d54f2ba7-d068-460d-ae8b-834c5f4d04c5
TopologyId :
c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId :
9e6002af-412c-4454-b761-3f01474d32be
Name :
ContentProcessingComponent1
ServerName : xxxxxxxxxxxxxxxxxxx
IndexPartitionOrdinal : 0
RootDirectory
: G:\SearchIndex
ComponentId
: 1a049aa2-e1db-4c28-94c1-48ca75c2d696
TopologyId
: c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId
: dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name
: IndexComponent2
ServerName
: xxxxxxxxxxxxxxxx
ComponentId : 7681227d-ae1c-40fd-a038-9da726a7964c
TopologyId :
c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId :
9e6002af-412c-4454-b761-3f01474d32be
Name :
CrawlComponent0
ServerName : xxxxxxxxxxxxxxxxx
NumProcessingTasksInParallel : 4
MaxSortMemoryInMB
: 40
ComponentId
: e0e3225f-094d-4254-b0d1-af4bfeb51020
TopologyId
: c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId
: dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name
: AnalyticsProcessingComponent2
ServerName
: xxxxxxxxxxxxxxxxxxx
ComponentId : a57f27ec-312c-4112-b83d-821e7efd1954
TopologyId :
c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId :
9e6002af-412c-4454-b761-3f01474d32be
Name :
QueryProcessingComponent1
ServerName : xxxxxxxxxxxxxxxxx
NumProcessingTasksInParallel : 4
MaxSortMemoryInMB
: 40
ComponentId
: 5779ac5c-a1b0-4680-96f6-fd9f796e678f
TopologyId
: c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId
: 9e6002af-412c-4454-b761-3f01474d32be
Name
: AnalyticsProcessingComponent1
ServerName
: xxxxxxxxxxxxxxxxxxxx
ComponentId : 4aed084c-9bd6-4e29-9c8e-a80d150c1819
TopologyId :
c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId :
dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name :
ContentProcessingComponent2
ServerName : xxxxxxxxxxxxxxxxxxxxxxxx
You can proceed to remove the component from the old box
Remove-SPEnterpriseSearchComponent -Identity
IndexComponent1 -SearchTopo
logy $clone -confirm:$false
Remove-SPEnterpriseSearchComponent -Identity
QueryProcessingComponent1 -
SearchTopology $clone -confirm:$false
Remove-SPEnterpriseSearchComponent -Identity
AnalyticsProcessingComponen
t1 -SearchTopology $clone -confirm:$false
Remove-SPEnterpriseSearchComponent -Identity
ContentProcessingComponent1
-SearchTopology
$clone -confirm:$false
New-SPEnterpriseSearchCrawlComponent
-SearchTopology $clone -SearchServi
ceInstance $NewServer
ComponentId : 180af716-63b6-4748-a425-4ec2bd8500ce
TopologyId :
c57a59b5-6d00-456f-aa4d-e1054959cc60
ServerId :
dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name :
CrawlComponent1
ServerName : xxxxxxxxxxxxxxx
PS G:\> Set-SPEnterpriseSearchTopology -Identity $clone
PS G:\> $ssa = Get-SPEnterpriseSearchServiceApplication
PS G:\> $active = Get-SPEnterpriseSearchTopology
-SearchApplication $ssa -Active
PS G:\> $clone = New-SPEnterpriseSearchTopology
-SearchApplication $ssa -Clone -
SearchTopology $active
PS G:\> Get-SPEnterpriseSearchComponent -SearchTopology
$clone
IndexPartitionOrdinal : 0
RootDirectory
: G:\SearchIndex
ComponentId
: faf2f037-ff6d-463e-a883-012ba4af3cdf
TopologyId
: 4d112a09-650f-4f06-afb4-8324f1c43c3c
ServerId
: dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name
: IndexComponent2
ServerName
: xxxxxxxxxxxxxxxxxxx
ComponentId : 74abdb41-a703-4ca1-8386-46fcac8e181f
TopologyId :
4d112a09-650f-4f06-afb4-8324f1c43c3c
ServerId :
dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name :
CrawlComponent1
ServerName : xxxxxxxxxxxxxxxxxxxx
ComponentId : 1faec968-e84f-4f83-b818-f68b778ebcff
TopologyId :
4d112a09-650f-4f06-afb4-8324f1c43c3c
ServerId :
9e6002af-412c-4454-b761-3f01474d32be
Name :
CrawlComponent0
ServerName : xxxxxxxxxxxxxxxxxxxxxx
ComponentId : 6e94c873-e1df-4210-832e-8c6e5a5da09d
TopologyId :
4d112a09-650f-4f06-afb4-8324f1c43c3c
ServerId :
dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name :
ContentProcessingComponent2
ServerName : xxxxxxxxxxxxxxxxxxxx
NumProcessingTasksInParallel : 4
MaxSortMemoryInMB
: 40
ComponentId
: 6ec2864b-9408-4dea-a4a8-f953fbac0fc4
TopologyId
: 4d112a09-650f-4f06-afb4-8324f1c43c3c
ServerId
: dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name
: AnalyticsProcessingComponent2
ServerName
: xxxxxxxxxxxxxxxxxxxxxx
ComponentId : fd8986af-fc20-4063-bf54-dd4431cb6227
TopologyId :
4d112a09-650f-4f06-afb4-8324f1c43c3c
ServerId :
dca11724-2cf8-4fb0-8ead-7dd2112c7a96
Name :
QueryProcessingComponent2
ServerName : xxxxxxxxxxxxxxxxxxx
ComponentId : 5e36f57a-80eb-4e20-9c08-25b6a6305bac
TopologyId :
4d112a09-650f-4f06-afb4-8324f1c43c3c
ServerId :
9e6002af-412c-4454-b761-3f01474d32be
Name :
AdminComponent1
ServerName : xxxxxxxxxxxxxxxxxx
You can now remove component from the old server
Remove-SPEnterpriseSearchComponent -Identity
CrawlComponent0 -SearchTopo
logy $clone -confirm:$false
Set-SPEnterpriseSearchTopology -Identity $clone
Comments