brianlala / AutoSPInstaller

Automated SharePoint 2010/2013/2016/2019/SE PowerShell-based installation script.
https://autospinstaller.com
MIT License
171 stars 81 forks source link

Managed account has already been registered #23

Closed tsk4600 closed 3 years ago

tsk4600 commented 6 years ago

Hi, the script stalls at:


Exception : System.Management.Automation.RuntimeException: - Failed to create manag ed account TargetObject : - Failed to create managed account CategoryInfo : OperationStopped: ( - Failed to create managed account:String) [], Runti meException FullyQualifiedErrorId : - Failed to create managed account ErrorDetails : InvocationInfo : System.Management.Automation.InvocationInfo ScriptStackTrace : at AddManagedAccounts, C:\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1: line 2237 at Setup-Farm, C:\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line 212 at , C:\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line 427 at , : line 1 PipelineIterationInfo : {} PSMessageDetails :

any ideas?

regards Theis

brianlala commented 6 years ago

Is your account name create than 20 characters?

sduschinger commented 5 years ago

I had the same problem. There was a problem and I re-ran AutoSPInstaller and i ran into this error.

Open the SharePoint Shell and run Get-SPManagedAccount. Make sure that in your config-file the username is exactly as stated there. In my case i had to remove ".local" from the domain name.

For the implementation it would probably be better to strip off the domain name and use get-spmanagedaccount -Identity "username" instead of Where-Object {$_.UserName -eq $($spservice.username)}

farid-ics commented 3 years ago

hello,

i had same issue.

the solution is simple: you must remove the extension from your domain example: mydomain.net change it to mydomain or : mydomain.net in capitals MYDOMAINENET