Reprovision sharepoint server search service when there is a situation where you find status of sharepoint server search service in stopping state. When there is an issue in search service application and its component due to which sharepoint search is not working. You need to restart service sharepoint server search. While restart, you find the sharepoint server search service stuck stopping state. In that case this post is helpful.
Restart sharepoint server search service
Run below script to restart or reprovision sharepoint server search service.
Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue
$SearchServiceInstance = Get-SPEnterpriseSearchServiceInstance -Identity "WIN-Q2REPGHF9DU"
Start-SPEnterpriseSearchServiceInstance -identity $SearchServiceInstance # Wait for search service instance to come online
do {$online = Get-SPEnterpriseSearchServiceInstance -identity $SearchServiceInstance; Write-Host "Waiting for service: " $online.Status}
until ($online.Status -eq "Online")
Once script started running, you will find the details as seen in figure below.

The service sharepoint server serach will be stopped first, then will chanage to state starating and finally will come to status as Started.

Discover more from SharePointTechnicalSupport
Subscribe to get the latest posts sent to your email.
Pingback: Degraded index partition yellow warning | SharePointTechnicalSupport