Error in PowerShell updating SharePoint Farm Password

Dominique Graves 251 Reputation points
2021-09-17T00:09:53.097+00:00

We are running SharePoint Server 2019. I am attempting to change the farm account password. Here are the steps I have done so far but then got an error.

  1. Changed the password in AD
  2. Restarted the SharePoint servers.
  3. In SharePoint Management Shell, I ran the following:
    $username="DOMAIN\spFarm" $newpassword=ConvertTo-SecureString -String "password" -AsPlainText -Force Set-SPManagedAccount -Identity $username -ExistingPassword $newpassword -UseExistingPassword:$true

Unfortunately I got this red result in PowerShell. It's odd because it states it was successful but then it's red and mentions InvalidData and CryptographicException.
132866-set-spmanagedaccount-error.png

The event log has these entries but I think that these are just the services in Windows services that need to be restarted after the password was changed because there are four of these event log entries with different GUIDs and we have four services in Windows services that use the farm account.

"Error updating the account password for process identity Id f6b78c5c-f9c4-46cb-81ed-a4b556de62ee, please fix manually. The operation completed successfully."

Before continuing I wanted to reach out and see if anyone has experienced this. I would hate to ignore the red in the PowerShell only to find out down the road that it affected something. So in the meantime, I changed the password back to the old one in AD, then ran the same PowerShell script with the old password. It actually gave me the same red result but everything seems to be working ok. Should I ignore the red and change the password and continue through with the next steps of restarting the services and changing passwords in Windows services where necessary?

I should mention that I've used this same procedure in our SharePoint 2016 environment with no problem but I didn't see any directive on new ways to update the farm password in 2019.

SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,900 questions
0 comments No comments
{count} votes

2 additional answers

Sort by: Most helpful
  1. Elsie Lu_MSFT 9,791 Reputation points
    2021-09-17T08:55:12.89+00:00

    Hi @Dominique Graves , welcome to Q&A forum!

    In SharePoint 2016 and 2019, there is no difference in the steps to change the password. Per my test in my SP2019, I am not able to reproduce your issue. Are you using the same command as me?
    133092-68.jpg

    Or you could also try to change the password manually:
    How to Change SharePoint Farm Account Password using PowerShell?
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. Dominique Graves 251 Reputation points
    2021-09-17T16:15:05.81+00:00

    @Elsie Lu_MSFT
    Yes, those are the commands I ran.

    When you say change it manually, do you mean change through AD and then change in Central Admin via managed accounts?