Saturday 24 September 2016

Update or Change Service Account Password using PowerShell

SharePoint 2013 SP Managed Account:-

- Service accounts are accounts in Active Directory or you local system that are used by a Service (example: running the SQL Server Agent, Running the Search Crawler).
- Managed accounts are Service Accounts in Active Directory or your local system that are managed by SharePoint (example: automatic password management).
The difference between them is that the Managed Accounts are managed by SharePoint, while a regular Service account is not managed by SharePoint.

Get-SPManagedAccount

Retrieves accounts registered in the configuration database.
Syntax:-
Get-SPManagedAccount

Set-SPManagedAccount

Configures the managed account.

There are many ways we can change or update the Service account password.
- Open the server with service account.
- press "Ctr + Alt + Del" and change the password.
- After updated the password run the below script.
or Change the password through AD Service directly.

Syntax:-
$password=ConvertTo-SecureString -String $Encrypted -AsPlainText -Force
$m = Get-SPManagedAccount -Identity "DOMAINx\UserY"
Set-SPManagedAccount -Identity $m - ExistingPassword $password -UseExistingPassword $True

No comments:

Post a Comment