This project has moved and is read-only. For the latest updates, please go here.

Running AutoSPInstaller multiple times

Topics: General Questions, Support
Aug 1, 2014 at 5: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\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 5:31 PM

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,
Aug 1, 2014 at 7:45 PM
Edited Aug 1, 2014 at 7: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:

  • Adding Managed Accounts...
    • Account "\SP_Services:
    • Creating local profile for\SP_Services...
    • Adding to local Admins (temporarily)...Done.
    • Removing from local Admins...Done.
    • Done.
    • Registering managed account\SP_Services...
      New-SPManagedAccount : Account\SP_Services has already been registered.
      At \\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, \\it\installs\Sharepoint\SP2013\AutoSPInstaller\SP\AutoSPInstall
                    er\AutoSPInstallerFunctions.ps1: line 2077
                    at Setup-Farm, \\\it\installs\Sharepoint\SP2013\AutoSPInstaller\SP\AutoSPInstaller\AutoS
                    PInstallerMain.ps1: line 203
                    at <ScriptBlock>, \\\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\SP_Services not found
    At \\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
    • FullyQualifiedErrorId : - Managed Account\SP_Services not found

  • Script halted!
  • Error provisioning the Managed Metadata Service Application
I really don't get why it is coming up since the Managed Services Account does exist and was used/validated earlier in the process.
Aug 4, 2014 at 5:28 PM
Ok to make life more fun. Now after the weekend the Managed MetaData Service App installs correctly. The only change I made was to reduce the password length from 20 characters to 12 characters.
Aug 4, 2014 at 6:38 PM
Yet another interesting quirk.

using the account name\name works for most things but I was running into errors with the MetaData and UPS services but now that I changed it to domain\name it is installing those services without any issues.