{"id":398,"date":"2012-11-03T16:31:37","date_gmt":"2012-11-03T11:01:37","guid":{"rendered":"https:\/\/blog.binarybits.net\/?p=398"},"modified":"2021-05-03T16:20:10","modified_gmt":"2021-05-03T10:50:10","slug":"setting-password-for-managed-account","status":"publish","type":"post","link":"https:\/\/blog.binarybits.net\/setting-password-for-managed-account\/","title":{"rendered":"Setting password for Managed Account"},"content":{"rendered":"
Password for Managed Account in SharePoint 2010 can be set in the following ways.<\/p>\n
Set a new password for Managed Account<\/strong><\/p>\n To update the account password to a new automatically generated value, from the Windows PowerShell command prompt, type the following:<\/p>\n Set-SPManagedAccount \u2013Identity domain\\user -AutoGeneratePassword $true<\/p><\/blockquote>\n Update the password for a Managed Account that has already been reset through Active Directory<\/strong><\/p>\n If the password for a managed service account has been manually changed outside of SharePoint (such as directly in Active Directory), you can update the password to the new value in SharePoint 2010 as follows<\/p>\n To update the account password to a already changed password, from the Windows PowerShell command prompt, type the following:<\/p>\n Set-SPManagedAccount -Identity domain\\user\u00a0-UseExistingPassword<\/p><\/blockquote>\n#If there is only one managed account, the following line could be written as: \r\n#$inputManagedAcct = Get-SPManagedAccount\r\n\r\n$inputManagedAcct = Read-Host \"Enter managed account as Domain\\User\"\r\n\r\n#Input the desired new password\r\n$inputPasswd = Read-Host \"Enter new password for managed account\" \u2013AsSecureString \r\n\r\n#Change the password for the managed account to the new value Set-SPManagedAccount -Identity $inputManagedAcct -NewPassword $inputPasswd<\/pre>\n
#If there is only one managed account, the following line could be written as: \r\n#$inputManagedAcct = Get-SPManagedAccount\r\n\r\n$inputManagedAcct = Read-Host \"Enter managed account as Domain\\User:\" \r\n#Input the Managed Account $inputPasswd = Read-Host \"Enter password from Active Directory for managed account:\" \u2013AsSecureString \r\n\r\n#Change the password in SharePoint for the managed account to the new value \r\nSet-SPManagedAccount -Identity $inputManagedAcct -ExistingPassword $inputPasswd \u2013UseExistingPassword $true<\/pre>\n