Today I faced an issue, when I tried to install SharePoint 2016 on Windows Server 2016 with AutoInstaller scripts.

Error says:

Registering managed account "DOMAIN\Service Account""1... New-SPManagedAccount : The given key was not present in the dictionary. At D:\AutoSPInstaller\AutoSPInstallerModule.psm1:2258 char:17 + New-SPManagedAccount -Credential $credAccount | Out-N ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (Microsoft.Share...wManagedAccount:SPCmdletNewManagedAccount) [New-SPManage dAccount], KeyNotFoundException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewManagedAccount

  • Script halted!

Exception : System.Management.Automation.RuntimeException: - Failed to create managed account TargetObject : - Failed to create managed account CategoryInfo : OperationStopped: ( - Failed to create managed account:String) [], RuntimeException FullyQualifiedErrorId : - Failed to create managed account ErrorDetails : InvocationInfo : System.Management.Automation.InvocationInfo ScriptStackTrace : at AddManagedAccounts, D:\AutoSPInstaller\AutoSPInstallerModule.psm1: line 2259 at Set-FarmConfig, D:\AutoSPInstaller\AutoSPInstallerMain.ps1: line 214 at , D:\AutoSPInstaller\AutoSPInstallerMain.ps1: line 429 at , : line 1 PipelineIterationInfo : {}

PSMessageDetails :

enter image description here


Most probably you have a problem with reading the account. Try this process to resolve it:

  1. Go into Active Directory Users and Computers snap-in
  2. Click View…Advanced Features on the menu
  3. Find my service account in the directory
  4. Right-click on it and select Properties from the menu
  5. Click on the Security tab
  6. Click on Authenticated Users in the top part of the dialog
  7. Check the Read box in the Allow column
  8. Click the OK button to save the changes
| improve this answer | |
  • Thank you @Marek Sarad. Is this one time task? Because, this Service Account which we got error were already member of another SharePoint Farm Admin group. – Srinu Dasari Nov 23 '18 at 5:49
  • Yes it is one time task. The account was probably wrongly set up. – Marek Sarad Nov 23 '18 at 8:31
  • But, In existed SharePoint 2013 Farm we are using the same service account as Farm Admin. – Srinu Dasari Nov 23 '18 at 9:41
  • Maybe when the 2013 farm was set up the permission could be read, hard to say without accessing the AD. – Marek Sarad Nov 30 '18 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.