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

Script halted at MySite setup

Topics: Support
Aug 19, 2014 at 7:55 PM
My script keeps halting at MySite creation with the error "The WebApplication doesn't use the ContentDB specified." My MySite WebApplication has a different content database from the portal web app. The mysite content DB is created in SQL. I'm not sure why the script is halting. The code lines in this message don't help.

Exception : Microsoft.SharePoint.PowerShell.SPCmdletException: The WebApplication doesn't use the
                    ContentDB specified.
                       at Microsoft.SharePoint.PowerShell.SPCmdletNewSite.CreateDataObject()
                       at Microsoft.SharePoint.PowerShell.SPNewCmdletBase`1.InternalProcessRecord()
                       at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessRecord()
TargetObject : Microsoft.SharePoint.PowerShell.SPCmdletNewSite
CategoryInfo : InvalidData: (Microsoft.Share...SPCmdletNewSite:SPCmdletNewSite) [New-SPSite],
FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSite
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at CreateWebApp, E:\AutoSPInstaller\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1: line 2721
                    at CreateWebApplications, E:\AutoSPInstaller\SP\AutoSPInstaller\AutoSPInstallerFunctions.ps1: 
                    line 2512
                    at Setup-Farm, E:\AutoSPInstaller\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line 204
                    at <ScriptBlock>, E:\AutoSPInstaller\SP\AutoSPInstaller\AutoSPInstallerMain.ps1: line 403
                    at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails :
Aug 19, 2014 at 8:45 PM
You will need to share your XML.
Aug 19, 2014 at 8:49 PM
Issue resolved. I used the Get-SPContentDatabase cmdlet to view the attached content DBs for my web applications. I noticed that my Portal had 2 content DBs so I double-checked my Web Application setup and realized I had the wrong DB name in my site collection section for both my Portal and MySiteHost. Once I corrected them. I used Dismount-SPContentDatabase cmdlet to detach the extra content database and restarted the script.