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

SPCmdletPipeBindException when creating new site collection

Jul 23, 2011 at 3:28 PM

Script works fine until about 3/4 of the way through, when it aborts.  Here is a snippet from the transcript...
 - Adding Managed Accounts
 - Creating local profile for STI\spservice...Done.
 - Managed account STI\spservice already exists.
 - Creating local profile for STI\portalacc...Done.
 - Managed account STI\portalacc already exists.
 - Creating local profile for STI\mysitesacc...Done.
 - Managed account STI\mysitesacc already exists.
 - Creating local profile for STI\SPsearch...Done.
 - Managed account STI\SPsearch already exists.
 - Done Adding Managed Accounts
 - Creating web applications...
 - Web app "STi Back Office" already provisioned.
 - Creating Site Collection "http://SERVER"...
Script aborted!

Exception             : Microsoft.SharePoint.PowerShell.SPCmdletPipeBindExcepti
                        on: Cannot find an SPWebApplication object that contain
                        s the following Name, Id, or Url: http://SERVER.
                           at Microsoft.SharePoint.PowerShell.SPWebApplicationP
                        ipeBind.Read(Boolean exactUrl)
                           at Microsoft.SharePoint.PowerShell.SPCmdletNewSite.I
                           at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessR
TargetObject          : Microsoft.SharePoint.PowerShell.SPCmdletNewSite
CategoryInfo          : InvalidData: (Microsoft.Share...SPCmdletNewSite:SPCmdle
                        tNewSite) [New-SPSite], SPCmdletPipeBindException
FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSite
ErrorDetails          : 
InvocationInfo        : System.Management.Automation.InvocationInfo
PipelineIterationInfo : {0, 1}
PSMessageDetails      : 

Jul 25, 2011 at 5:31 PM

Was the script run before? You should try deleting the web app and running it again.

Aug 10, 2011 at 6:53 PM

Im getting the same message.  I have tried deleteing the webapp and running the script and it errrors at the same spot.

Aug 10, 2011 at 7:38 PM

I think i figured it out.  This is my fault

If your creating a custom web app then the localhost setting for the site collection needs to match the url listed for that web app.