
The service instance on your servers should be started before creating the service components. Check the search service instance status by executing:
Get-SPEnterpriseSearchServiceInstance -Local
If it is not Online
, start the instance by executing:
$hostA = Get-SPEnterpriseSearchServiceInstance -Identity "server-name"
Start-SPEnterpriseSearchServiceInstance -Identity $hostA
Or (single server)
Get-SPEnterpriseSearchServiceInstance -Local | Start-SPEnterpriseSearchServiceInstance
Wait for around 5 minutes and then check the status again. Make sure it is Online
.
Then you can continue the script from “Step 5” or “Step 6”, see the results.
References: Get-SPEnterpriseSearchServiceInstance. / Start-SPEnterpriseSearchServiceInstance.
If an Answer is helpful, please click "Accept Answer" and upvote it.
**Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. **