How to Get SharePoint Farm Account Password using PowerShell?

Requirement: Had to take over a SharePoint Farm, and we don’t have the Farm Account Password! We needed the credentials of the SharePoint Farm account.

Get SharePoint Farm Account Password:

SharePoint farm account user name and password can be retrieved with this little trick: The Central Admin site uses the SharePoint Farm account. So, let’s retrieve the credentials of the SharePoint Central admin App Pool. This tiny script gets you the user name and password of the SharePoint Farm account.

Import-Module WebAdministration

#Get Central Admin App Pool - which Runs on FARM account
$CAPool = Get-ChildItem -Path IIS:\AppPools\ | Where { $_.Name -eq "SharePoint Central Administration v4" }

#Get User Name and Password for Farm Account

That’s All! Now, you have the Farm Account Password! Similarly, You can also retrieve any managed account password or IIS application pool passwords. One can argue on misuse of this. But this is for information/recovery purposes only.

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

Leave a Reply

Your email address will not be published. Required fields are marked *