I have had the problem to set the SharePoint Sevice Account of "SharePoint Server Search" to a special user account during a automatic setup.
In other words: I want to automate this step:
Central Administration -> Security -> Configure Service Accounts
There is no PowerShell command as far as I can see.
You can use this script for this job:
$farm =(Get-SPFarm)
$farm.get_Services() | ? { $_.typename -ieq "SharePoint Server Search" } | % {
$searchservice=$_
$i = $searchservice.get_ProcessIdentity()
$i.set_CurrentIdentityType(3)
$i.set_Username($searchUser)
$i.Update()
$i.Deploy()
}
nice post, thanks!
I’m not a powershell guy, Could you please help in elaborating each of these steps