Update The Default Content Access Account For SharePoint Search Service

Search Service is one of the most widely used and most useful functionalities of SharePoint. Once the Search Service is configured, an account is used to crawl and index the SharePoint Content which is known as the default content access account. You can find the current default content access account from the Search Administration page.

There can be instances where we have to change this default content access accounts. In this blog, let’s see how we can achieve this using PowerShell.

You can use the below PowerShell script to get this done. As the first step, get the Search Instance. In the next step, get the account password from the user which will be converted to a Secure String. Finally, use the ‘Set-SPEnterpriseSearchServiceApplication’ command to change the default content access account. 

  1. $SearchInstance = Get-SPEnterpriseSearchServiceApplication "Search Service"  
  2. $Pwd = Read-Host -AsSecureString  
  3.   
  4. Set-SPEnterpriseSearchServiceApplication -Identity $SearchInstance -DefaultContentAccessAccountName "AzureAD\Search" -DefaultContentAccessAccountPassword $Pwd   


Thus, we have run the PowerShell commands successfully.


Heading over to the Search Administration, we can see the new default content access account.

Summary - Thus, we saw how to change the default content access account for SharePoint Search Service.

Ebook Download
View all
Learn
View all