Change location of Index Search Service App in SharePoint 2013

Hi all! Today I bring something easy that I needed to do for a client, they had a particular drive for index location, so they need to reubicate to another location. This can be done trought PowerShell, so let’s begin

#you need to especify the name of the SearchService Configured in your farm
$ssa = Get-SPEnterpriseSearchServiceApplication "PRE_Search_Service"
$instance=Get-SPEnterpriseSearchServiceInstance -Local
$current=Get-SPEnterpriseSearchTopology -SearchApplication $ssa
$clone=New-SPEnterpriseSearchTopology -Clone -SearchApplication $ssa -SearchTopology $current
New-SPEnterpriseSearchIndexComponent -SearchTopology $clone -IndexPartition 0 -SearchServiceInstance $instance -RootDirectory "I:Index"
Set-SPEnterpriseSearchTopology -Identity $clone
Remove-SPEnterpriseSearchTopology -Identity $current

After executing this PS, the index will be generated in the new location

That’s all

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s