0

I'm working on creating a SP2013 search service application based on Todd Klindt's work (http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=378). It worked down to the line New-SPEnterpriseSearchAdminComponent –SearchTopology $clone -SearchServiceInstance $searchServiceInstance. I've modified the $clone and $searchserviceinstance from what he has to:

$ssa = Get-SPEnterpriseSearchServiceApplication
$active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active
$clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone -SearchTopology $active
write-host "we have a clone"
$searchServiceInstance = Get-SPEnterpriseSearchServiceInstance
write-host "we have a search service instance"

The two write-host commands print out fine, but when I get to the next line, New-SPEnterpriseSearchAdminComponent –SearchTopology $clone -SearchServiceInstance $searchServiceInstance, I get an error:

New-SPEnterpriseSearchAdminComponent : A positional parameter cannot be found that 
accepts argument 'â?SearchTopology TopologyId:
61b33981-a905-44f7-8000-eaa40e7b4676, CreationDate: 12/19/2014 2:18:35 PM,
State: Inactive, Components:  -SearchServiceInstance SearchServiceInstance
1

Before you create the service components you have to start the service instance on your server(s).

$hostA = Get-SPEnterpriseSearchServiceInstance -Identity “server-name”

Start-SPEnterpriseSearchServiceInstance -Identity $hostA

then go on with your code. example below

$ssa = Get-SPEnterpriseSearchServiceApplication
$newTopology = New-SPEnterpriseSearchTopology -SearchApplication $ssa

- Wait until the services become online (about 5 minutes)

New-SPEnterpriseSearchAdminComponent -SearchTopology $newTopology -SearchServiceInstance $hostA

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.