kwizcom banner advertisement

How to Change SharePoint Farm Account Password using PowerShell?

What is SharePoint farm account, BTW? Well, SharePoint farm account is a service account manages farm services, Used as the application pool identity for Central Administration, used for database access and in used to run SharePoint Timer service! In certain circumstances, You may have to change the Password of SharePoint Farm account, such as: Security Policies, Account has been compromised, SharePoint Admin left, etc.

How to Change SharePoint Farm Account Password?
Changing SharePoint farm account's password is similar to changing any other managed account's password in SharePoint. As a first step, Identify the SharePoint Farm account (How to Get SharePoint Farm Account) and then you can change the password as follows:

Case 1: Farm Account's Password is already changed in Active Directory
If the Farm account's password is already changed in Active Directory, You'll have to update the Farm account credentials in SharePoint. We use the STSADM command line tool to change Farm account password in SharePoint 2007 days: Stsadm -o updatefarmcredentials -userlogin "Domain\FarmAccount" -Password "Farm-Account-Password" . Starting SharePoint 2010, updating Farm Account's credential can be either from SharePoint Central Administration site or using PowerShell.

How to update the farm account credentials through Central Administration site?
  • Go to your SharePoint Central Administration site >> Click on Security >> Configure Managed Accounts
  • Click on "Edit" icon next to the SharePoint Farm account.
  • Tick "Change password now" check box and set "Use existing password" option
  • Enter the password (password which is already changed in AD) of the account and click on OK to update the password of SharePoint farm account.
This updates farm account password in SharePoint 2016.
sharepoint 2013 reset farm account password

Update Farm Account Credentials using PowerShell:
To sync the password change to SharePoint, run this PowerShell script.
#Get the Farm Account
$FarmAccount = Read-Host "Enter the Farm Account in Domain\User Format:"
 
#Get the changed Password for the farm account
$Password = Read-Host "Enter the changed password for Farm Account" –AsSecureString
 
#Update the password for farm account
Set-SPManagedAccount -Identity $FarmAccount -ExistingPassword $Password -UseExistingPassword $true


Case 2: Change password for SharePoint Farm Account
Lets say you want to change Farm account's password to a new password from SharePoint (Password isn't already changed in Active Directory). 

Farm Account Password Change using Central Administration:
  • Go to your SharePoint Central Administration site >> Click on Security >> Configure Managed Accounts
  • Click on "Edit" icon next to the SharePoint Farm account.
  • Tick "Change password now" check box and enter the new password by setting "Set account password to new value" option
  • Enter the new password and click on OK to change the password of SharePoint farm account.
sharepoint 2013 reset farm account password

Change Farm Account Password using PowerShell
To reset the farm account's password to a new one, Run this PowerShell script:
#Get the Farm Account
$FarmAccount = Read-Host "Enter the Farm Account in Domain\User Format:"
 
#Get the changed Password for the farm account
$Password = Read-Host "Enter the New password for Farm Account" –AsSecureString
 
#Update the password for farm account
Set-SPManagedAccount -Identity $FarmAccount -NewPassword $Password -ConfirmPassword $Password

Additionally, You may have to check in these items, but not limited to (In case, You used the Farm account in these places): User Profile Synchronization Service, Workflow Service Account, any Secure store stored credentials, SQL Server Service account.

Do not set the option for auto change Farm account (SharePoint automatically changes to random password)! You'll need Farm account credentials every now and then in your SharePoint Farm Administration.

Here is my related post on changing SharePoint managed account's password: How to Change Managed Account's Password in SharePoint
How to Change SharePoint Farm Account Password using PowerShell? How to Change SharePoint Farm Account Password using PowerShell? Reviewed by Salaudeen Rajack on August 25, 2017 Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.