Managed accounts are active directory accounts for SharePoint's whose credentials are managed by SharePoint. Managed accounts in SharePoint 2013 is explained in my another article: Configuring Managed Accounts in SharePoint 2013.
To create a managed account using PowerShell: use the New-SPManagedAccount cmdlet. Here is how:
Register new managed accounts SharePoint 2013 in Bulk:
Lets create multiple Managed accounts in SharePoint 2013 in bulk:
SharePoint register managed account access denied: unable to register managed account
You may get access denied error when you try to register a managed account via Central Administration, You'll get this error: >> Security >> Configure Managed Account >> Register Managed Account.
Important: Before creating a managed account, They must be already created in your Active directory.
To register new managed account in SharePoint 2013, here are the steps:- Open Central administration.
- Go Security >> Click on Configure Managed Accounts.
- Click the Register Managed Account link to create a new managed account.
- Enter the account’s AD username in domain\username format. Specify the account's password.
- Optionally, You can enable the automatic password reset.
- Click "OK" to to create managed account in SharePoint 2013.
Important: To register managed account SharePoint 2013, You must be a member of Farm Administrators SharePoint group.
To create a managed account using PowerShell: use the New-SPManagedAccount cmdlet. Here is how:
$cred = Get-CredentialThis prompts to enter credentials and register managed account in SharePoint 2010/2013.
New-SPManagedAccount –Credential $cred
Register new managed accounts SharePoint 2013 in Bulk:
Lets create multiple Managed accounts in SharePoint 2013 in bulk:
Add-PSSnapin microsoft.sharepoint.powershell -ea SilentlyContinueHere, I've specified a common password for all managed account. However, you can specify different passwords for different service accounts.
#Define a common password for all service accounts
$password = "Password1"
$securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force
#List of Service accounts
$ServiceAccounts = "SP-Farm","SP_Services","SP_Search","SP_UserProfile"
ForEach ($Account in $ServiceAccounts)
{
#Get the account in Domain\UserName format
$userName = $env:USERDOMAIN + "\" + $Account
#Set the Credentials
$cred = New-Object System.Management.Automation.PSCredential -ArgumentList $username, $securePassword
#Create Managed Account
New-SPManagedAccount -Credential $cred
}
Troubleshooting:
Whiletrying to add managed account in SharePoint 2010 or in SharePoint 2013, You may encounter the below issues:SharePoint register managed account access denied: unable to register managed account
You may get access denied error when you try to register a managed account via Central Administration, You'll get this error: >> Security >> Configure Managed Account >> Register Managed Account.