Answered by:
Changing passwords for all service accounts using Credential Management

Question
-
Hello,
I want to change passwords for service accounts:
1. Account which was used to setup farm.
2. Account for administering farm.
3. Account for user profile service
4. Account for search service.
5. Account for other service applications..
6. Account for application pools.
7. Account for crawling.
I would like to do this using Credential Management. It allows to generate passwords based on the password rules from AD.
But two things are not clear for me:
1. In case I change password from the Credential Management, I'll need to update password manually for application pools, or services (in services.msc), or on the SQL?
2. How can I get a new password? There is no option to send new password by email.Wednesday, June 10, 2020 2:35 PM
Answers
-
Below article is the best guide to change the password of the service accounts.
First you should change the password of the account in AD and then change the password of the application pool account in SharePoint farm. you can update the password from Central Admin UI as well.
If you want to use an existing password, you could use PowerShell command below.
Add-Pssnapin "Microsoft.SharePoint.PowerShell" Set-SPManagedAccount -Identity $username -ExistingPassword $newpassword -UseExistingPassword:$true
Below articles with similar questions:
sharath aluri
- Proposed as answer by Lisa Chen1226Microsoft contingent staff Thursday, June 11, 2020 2:46 AM
- Marked as answer by Oleh Tserkovnyuk Friday, July 17, 2020 4:36 PM
Wednesday, June 10, 2020 5:54 PM -
You cannot set the password/automatically update the password for all of those accounts. The UPSA Sync, Search crawl, and any Secure Store credentials must be manually reset and then set within Central Admin/PoSh. Passwords can be decrypted via:
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}}
Trevor Seward
Office Apps and Services MVP
Author, Deploying SharePoint 2019
Author, Deploying SharePoint 2016
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.- Proposed as answer by Lisa Chen1226Microsoft contingent staff Monday, June 15, 2020 11:35 AM
- Marked as answer by Oleh Tserkovnyuk Friday, July 17, 2020 4:37 PM
Friday, June 12, 2020 1:31 PM
All replies
-
Below article is the best guide to change the password of the service accounts.
First you should change the password of the account in AD and then change the password of the application pool account in SharePoint farm. you can update the password from Central Admin UI as well.
If you want to use an existing password, you could use PowerShell command below.
Add-Pssnapin "Microsoft.SharePoint.PowerShell" Set-SPManagedAccount -Identity $username -ExistingPassword $newpassword -UseExistingPassword:$true
Below articles with similar questions:
sharath aluri
- Proposed as answer by Lisa Chen1226Microsoft contingent staff Thursday, June 11, 2020 2:46 AM
- Marked as answer by Oleh Tserkovnyuk Friday, July 17, 2020 4:36 PM
Wednesday, June 10, 2020 5:54 PM -
Hi Oleh,
If Sharath's reply helps you, please remember to mark it as an answer.
Thanks for your understanding.
Best Regards,
Lisa ChenPlease remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
SharePoint Server 2019 has been released, you can click here to download it.
Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.Thursday, June 11, 2020 2:46 AM -
Thank you. First question is clear.
I would like to clarify my second question. In case I use option provided by Credential Management to generate a new password for account, how I can get this password?
Friday, June 12, 2020 1:05 PM -
You cannot set the password/automatically update the password for all of those accounts. The UPSA Sync, Search crawl, and any Secure Store credentials must be manually reset and then set within Central Admin/PoSh. Passwords can be decrypted via:
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}}
Trevor Seward
Office Apps and Services MVP
Author, Deploying SharePoint 2019
Author, Deploying SharePoint 2016
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.- Proposed as answer by Lisa Chen1226Microsoft contingent staff Monday, June 15, 2020 11:35 AM
- Marked as answer by Oleh Tserkovnyuk Friday, July 17, 2020 4:37 PM
Friday, June 12, 2020 1:31 PM -
Hi Oleh,
Please remember to mark the helpful post as answers.
Thanks for your understanding.
Best Regards,
Lisa ChenPlease remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
SharePoint Server 2019 has been released, you can click here to download it.
Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.Monday, June 22, 2020 8:33 AM -
Hi Oleh,
Is there anything update?
Best Regards,
Lisa ChenPlease remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
SharePoint Server 2019 has been released, you can click here to download it.
Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.Thursday, July 2, 2020 9:10 AM