How to change search service account using SharePoint Central Administration
The simplest way to change the account of a service in SharePoint is to:
- Run Central Administrator
- Go to Security > Configure service accounts
- Select “Windows Service – SharePoint Server Search”
- In “Select an account for this component” select the account that you want and if it is not in the list, click “Register new managed account” and add it easily.
How to change search service account using PowerShell
But sometimes it’s not as easy as above to change a service account in SharePoint. For example you have installed SharePoint on a server for development whiout adding “Active Directory Domain Services” server role. In that case you can only add Managed Accounts through PowerShell and even though it won’t be displayed on managed account list in Central Administration and you can only use PowerShell to assign them to different services.
Step1 – Here is how to add a managed account in PowerShell:
First, go to the Start menu, then “Microsoft SharePoint 2010 Products” and run SharePoint 2010 Management Shell” which will run PowerShell and adds SharePoint Snapin so you can run SharePoit’s cmdlets. Now you can type the following commands:
$cred = Get-Credential "Username" New-SPManagedAccount -Credential $cred
Step 2 – How to assign it to OSearch14 (Enterprise Search):
$account = Get-SPManagedAccount -Identity "Username" $procId = (Get-SPEnterpriseSearchService).get_ProcessIdentity() $procId.CurrentIdentityType = "SpecificUser" $procId.ManagedAccount = $account $procId.Update() $procId.Deploy()
Remember that the last line is important beacuse you won’t see any changes until this step. It actually restarts the service with the recently assigned account.
Leave a Reply