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: Central Admin site uses SharePoint Farm account, So, let’s retrieve the credentials of 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
$CAPool.ProcessModel.UserName
$CAPool.ProcessModel.Password

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

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

Leave a Reply