Change Password for Service Account Using PowerShell

I recently had a situation in which for testing purposes I had to know the password for a managed service account. There’s no way to know the existing password but you can easily change it. I found a quick and easy to do this via PowerShell. Run the below command:

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

After you’re done, make sure to change the password back to a randomly generated password by SharePoint in Central Admin.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.