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 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, lets retrieve the credentials of SharePoint Central admin App Pool. This tiny script gets you the user name and password of 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 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!

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.