11 Mar 2015 | SharePoint | Windows
If left unchecked, the SharePoint search service to attempts to consume most of the available memory in a resource constrained development box. I usually disable it when I am not actively working with it.
This seems to be most effective way to completely disable the service. Although changing the password to an invalid one works as expected, it is important to replace the user account from a domain to a local user account as well. If not, the constant invalid login attempts could trigger your account lock out threshold policy in the domain.
So for convenience sake I created two batch files - one to disable the service and another to bring it back up.
The commands used to disable the search service:
net user searchDummy Sup3rSecr3tPwd /add /passwordchg:no /expires:never
net stop SPSearchHostController
net stop OSearch15
sc config "SPSearchHostController" obj= ".\searchDummy" password= "WrongPwd"
sc config "OSearch15" obj= ".\searchDummy" password= "WrongPwd"
taskkill /im:noderunner.exe /f
Notice that:
noderunner.exe
and release some memory.The commands used to start the service up again:
sc config "SPSearchHostController" obj= "domain\searchservice" password= "CorrectPwd"
sc config "OSearch15" obj= "domain\searchservice" password= "CorrectPwd"
net start OSearch15
net start SPSearchHostController