SharePoint 2010 has this wonderful new Multi Tenant feature, but when you click new search service application, or run the farm configuration wizard, it doesn’t provision the application in a partitioned mode and therefore cannot utilize this new Multi tenancy features. What’s worse is you can’t go back and change it after the fact either. To make it partitioned (or non-partitioned for that matter) you need to create a new service application and configure everything again.

This post will go through the process of using Windows Powershell to create a new SharePoint Server Search Service Application.

First you create a new application pool and store it in a variable to use in a later script step. You can change “SearchAppPool” to whatever you would like your application pool name to be, and obviously change”DOMAINSearchServiceAccount” to a valid account.

$app = new-spserviceapplicationpool -name SearchAppPool DOMAINSearchServiceAccount

Create the New Search Service Application making sure to use the –Partitioned Switch. Change “SearchServiceApplication” to whatever you would like the Search Service Application to be called.

$searchapp = new-spenterprisesearchserviceapplication -name SearchServiceApplication -Partitioned -applicationpool $app

Create the new search service application proxy. Again change “SearchServiceApplicationProxy” to whatever you would like the proxy to be called.

$proxy = new-spenterprisesearchserviceapplicationproxy -name SearchServiceApplicationProxy  -Partitioned -Uri $searchapp.uri.absoluteURI

Check to make sure that the search service is running

$si = get-spenterprisesearchserviceinstance –local


Provision the search administration application

set-spenterprisesearchadministrationcomponent –searchapplication $searchapp  –searchserviceinstance $si

Create a new crawl topology

$ct = $searchapp | new-spenterprisesearchcrawltopology

Create new crawl store

$csid = $SearchApp.CrawlStores | select id

$CrawlStore = $SearchApp.CrawlStores.item($

Create a new crawl component. Change “ServerName” to the name of your search server

$hname = ServerName

new-spenterprisesearchcrawlcomponent -crawltopology $ct -crawldatabase $Crawlstore -searchserviceinstance $hname

Activate the new crawl component

$ct | set-spenterprisesearchcrawltopology -active

Create a new query topology

$qt = $searchapp | new-spenterprisesearchquerytopology -partitions 1

Create a variable for the query partition

$p1 = ($qt | get-spenterprisesearchindexpartition)

Create a new query component

new-spenterprisesearchquerycomponent -indexpartition $p1 -querytopology $qt -searchserviceinstance $si

Create a variable for the property store database

$PSID = $SearchApp.PropertyStores | Select id

$PropDB = $SearchApp.PropertyStores.Item($

Set the query partition to use the property store database

$p1 | set-spenterprisesearchindexpartition -PropertyDatabase $PropDB

Activate the query topology

$qt | Set-SPEnterpriseSearchQueryTopology -Active

You now have a search service application running in partitioned mode, congrats!