Provision SharePoint 2010 Search with custom database names

I’m more of a mitliple scripts guy for configuring my SharePoint 2010 farms than a 1 humongous script guy that does everything. I prefer to use one script for installing my binaries and creating/joining the farm and then several scripts for configuring specific service applications. I find it easier for troubleshooting.

Anyway, here is the script I created based on the AutoSPInstaller for configuring the Search Service Application using custom database names:


$SSADB = "SharePoint_ServiceDB_SearchAdmin"
$SSAName = "Search Service Application"
$SVCAcct = "CONTOSO\the_search_service_account"
$SSI = get-spenterprisesearchserviceinstance -local

# 1.Start Services search services for SSI
Start-SPEnterpriseSearchServiceInstance -Identity $SSI

# 2.Create an Application Pool.
$AppPool = new-SPServiceApplicationPool -name $SSAName"-AppPool" -account $SVCAcct

# 3.Create the SearchApplication and set it to a variable
$SearchApp = New-SPEnterpriseSearchServiceApplication -Name $SSAName -applicationpool $AppPool -databasename $SSADB

#4 Create search service application proxy
$SSAProxy = new-spenterprisesearchserviceapplicationproxy -name $SSAName"ApplicationProxy" -Uri $SearchApp.Uri.AbsoluteURI

# 5.Provision Search Admin Component.
set-SPenterprisesearchadministrationcomponent -searchapplication $SearchApp -searchserviceinstance $SSI

This will just create your required databases. From this point on you can configure the required crawl / query topologies using Central Admin.

Leave a Reply

Your email address will not be published. Required fields are marked *