Need powershell for listing service account for

  • Secure Store Applications
  • Search Service Applications
  • Web Application Pool

And updating the password for the same. Hope this is as simple as Managed account.

Thanks in advance

1 Answer 1


I dont have well dressed code which will do this but rather i have pieces for it.

To get the list of all web application pool.

PS C:\Users\prxd3sfa> [Microsoft.SharePoint.Administration.SPWebService]::Conten
tService.ApplicationPools | ft Name , username

to get the list of all services application pool's id

 Get-SPServiceApplicationPool | ft name, Porcessaccountname

Now you have all the services account then you can use the below command to update the password.if you want to use the exiting password

$m = Get-SPManagedAccount -Identity “sharepoint\sa-spcontent”

Set-SPManagedAccount -Identity $m  -ExistingPassword (ConvertTo-SecureString “pass@word2″ -AsPlainText -force) –confirm

If you want change the password with something new

Set-SPManagedAccount -identity Domain\User -NewPassword (Converto-Securestring "P@ssword" -AsPlainText -Force) -SetNewPassword

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.