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

Error: New-SPWebApplication a SharePoint database named "" already exists

Topics: General Questions, Support
Nov 5, 2014 at 1:56 PM
I'm getting strange behavious when running the autospsinstaller script for SharePoint.
The script succesfully creates and checks the Managed accounts and sets up the first web app (Portal).
However, when trying to create the second web app (MySite host) it throws an error complaining about the database named "TEST_" already existing, which you might guess is the PREFIX instead of the correct name of the database.

My assumption to what might have happened is that the script doesn't correctly add the databasenames and its correct prefixes, resulting in each database being named after the databaseprefix.

Anyone know how to resolve this?

Full error details:

- Skipping creation of site "TEST Intranet" - already provisioned.

- Skipping creation of site "Enterprise Search Centre" - already provisioned.

- Adding * to local Intranet security zone...

  • Creating Web App "MySite Host"
    New-SPWebApplication : A SharePoint database named TEST_ already exists. You must supply another name for the new
    At C:\Software\Install\Scripts\AutoSPInstaller\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1:2157 char:9
  • New-SPWebApplication -Name $webAppName @appPoolAccountSwitch -Applicatio ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : InvalidData: (Microsoft.Share...PWebApplication:SPCmdletNewSPWebApplication) [New-SPWebA
      pplication], SPException
    • FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPWebApplication

  • Script halted!
  • Failed to create web application"