Skip to main content
Home
Blog

Main navigation

  • Home
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Knowledge Base
  4. How-To

How to fix farm service account password out of sync in SharePoint 2010?

By ongetc , 26 February, 2017

If you get the farm service account password out of sync you properly know your way around SharePoint 2010 pretty well so this article just goes right into the exact what to do to sync up your servers in the farm.

Here are things that you do to sync up your SharePoint farm service account password.

. Run GetManagedAccountPasswords.ps1 (see file below) to get a list of password from SecurityTokenServiceApplicationPool.
. Make sure all IIS Application Pools and Services that use farm service account has the right password, change it if you must.
. Run this "Set-SPManagedAccount -UseExistingPassword -Identity DOMAINA\SPSAdmin" to set the password on each SharePoint server in the farm.
. Run "Repair-SPManagedAccountDeployment" at the main server of the farm to verify the passwords are now in sync with no error.
. Run IISRESET command.

Your farm service account password should now in sync!

# file: GetManagedAccountPasswords.ps1
# instruction: run this to get a list of password on each SharePoint server
Add-PSSnapin Microsoft.SharePoint.PowerShell -EA 0;
function Bindings(){
return [System.Reflection.BindingFlags]::CreateInstance -bor
[System.Reflection.BindingFlags]::GetField -bor
[System.Reflection.BindingFlags]::Instance -bor
[System.Reflection.BindingFlags]::NonPublic;
}
function GetFieldValue([object]$o, [string]$fieldName){
$bindings = Bindings;
return $o.GetType().GetField($fieldName, $bindings).GetValue($o);
}
function ConvertTo-UnsecureString([System.Security.SecureString]$string){
$intptr = [System.IntPtr]::Zero;
$unmanagedString = [System.Runtime.InteropServices.Marshal]::SecureStringToGlobalAllocUnicode($string);
$unsecureString = [System.Runtime.InteropServices.Marshal]::PtrToStringUni($unmanagedString);
[System.Runtime.InteropServices.Marshal]::ZeroFreeGlobalAllocUnicode($unmanagedString);
return $unsecureString;
}
Get-SPManagedAccount | select UserName, @{Name='Password'; Expression={ConvertTo-UnsecureString (GetFieldValue $_ 'm_Password').SecureStringValue}}

Forums
How-To

Reseller hosting (free)

Hosting24 (w/ ssh)

A2 Hosting

Monthly archive

  • September 2009 (14)
  • October 2009 (11)
  • January 2010 (2)
  • June 2010 (3)
  • October 2011 (1)
  • March 2012 (1)
  • July 2012 (1)
  • February 2017 (564)
  • March 2017 (5)
  • April 2017 (2)

Pagination

  • 1
  • Next page

Popular content

Last viewed:

  • PHP Nuke Evolution Xtreme
  • Kalender
  • PHPXref
  • PHP Base Library
  • easyphpalbum
  • PHP Text DB API
  • InterJinnTM
  • How do redirect www using mod_rewrite?
  • Forma Lms
  • PLUME CMS

User login

  • Reset your password