Modifying a Cloned Topology with PowerShell
Following on directly from #SPThingADay 061 (http://1jj.uk/spthing061), today we’ll look at modifying our cloned topology.
The general principle is to take the cloned topology and add or remove server roles as necessary, then make it the live one.
Presuming $ssa holds our Search Service Application, and $clone holds our cloned topology…
You can get a reference to a Server whose role you wish to modify with:
Get-SPEnterpriseSearchServiceInstance …passing in the server name as an argument. (See http://1jj.uk/spgetsrchsvcinst)
Stick the result of this into a variable – say $server.
From here on, there is a pattern you can follow:
Each of the 6 Search Component types can be added to a Server in a Topology with very similar cmd-lets.
To add a Crawl Component to the Server we just retrieved, use:
New-SPEnterpriseSearchCrawlComponent -SearchTopology $clone -SearchServiceInstance $server (See http://1jj.uk/spnewsrchcrwlcmp)
For other components, swap the word Crawl for:
Admin, ContentProcessing, QueryProcessing, AnalyticsProcessing and Index.
However, Index is a special case – we’ll look at that tomorrow.