# Running AutoSPInstaller multiple times

 Topics: General Questions, Support Wiki Link: [discussion:554865]
Aug 1, 2014 at 4:27 PM
So I am still trying to get things to work (new install of Sharepoint 2013 and first time using the AutoSPInstaller). Mostly I am finding I have entered things wrong and thus break things. This last time I hit a message stating that the sp_services account could not be found.

One part I am wondering is if the script is able to be run a second time to make the configuration changes or if I need to delete everything (databases) and then try it again? I am running into the message "New-SPManagedAccount : Account kcs.com\SP_Services has already been registered."

All that said. I really like this program/scripts. As I can see it being really nice to test out the install and then try out SharePoint 2013 until we are comfortable with it and then blow it all away and start over.
Aug 1, 2014 at 4:31 PM
Hi,

AutoSPInstaller can be re-ran as many times as you like. Depending on the mistake you might have to delete the object that was created incorrectly then re-run the script. If you're unsure what when wrong, you can disconnect the farm using psconfig and delete the databases, then re-run the script.

Have a good one,
Ivan
Aug 1, 2014 at 6:45 PM
Edited Aug 1, 2014 at 6:52 PM
Ivan, Thanks for the response. I am surprised that AutoSPInstaller can be re-run multiple times and I am running into these issues. I don't know what would be different on my system then what other people have. Just to set the stage a bit better: I am trying to install SharePoint 2013 on Server 2012 R2 with SQL 2014 also on Server 2012

## When I try to rerun the scripts I get the following message:

• Account "kcs.com\SP_Services:
• Creating local profile for kcs.com\SP_Services...
• Done.
• Registering managed account kcs.com\SP_Services...
New-SPManagedAccount : Account kcs.com\SP_Services has already been registered.
At \kcs.com\it\installs\Sharepoint\SP2013\AutoSPInstaller\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1:2076 char:17
• New-SPManagedAccount -Credential $credAccount | Out-Null • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ • CategoryInfo : InvalidData: (Microsoft.Share...wManagedAccount:SPCmdletNewManagedAccount) [New-SPManage dAccount], InvalidOperationException • 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, \kcs.com\it\installs\Sharepoint\SP2013\AutoSPInstaller\SP\AutoSPInstall  er\AutoSPInstallerFunctions.ps1: line 2077 at Setup-Farm, \\kcs.com\it\installs\Sharepoint\SP2013\AutoSPInstaller\SP\AutoSPInstaller\AutoS PInstallerMain.ps1: line 203 at <ScriptBlock>, \\kcs.com\it\installs\Sharepoint\SP2013\AutoSPInstaller\SP\AutoSPInstaller\Au toSPInstallerMain.ps1: line 403 at <ScriptBlock>, <No file>: line 1 PipelineIterationInfo : {} PSMessageDetails : ## Where as when I roll back to a snapshot after sharepoint was installed and is waiting to be configured I can get to the provisioning of the Service Applications. Where I get this message: • Provisioning State Service Application... • Creating State Service Application Proxy... ## - Done creating State Service Application. • Provisioning Managed Metadata Service Application • Managed Account kcs.com\SP_Services not found At \kcs.com\it\installs\Sharepoint\SP2013\AutoSPInstaller\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1:2108 char:41 • If ($managedAccountGen -eq $null) { Throw " - Managed Account$(\$spservice.u ...
• ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
• CategoryInfo : OperationStopped: ( - Managed Acco...vices not found:String) [], RuntimeException