SPCmdletPipeBindException when creating new site collection

May 4, 2012 at 8:21 AM

Hi Brian,

new to the forum:

Background: Our topology is 2 App and 2 Front End servers , we using the AutoSPInstaller for each server differently i.e. server name changes , services change for each server ( as prev using single XML file for the whole farm failed )

We have installed the script perfectly fine on the first app server (app1) and while on the second app server (app2) we get the below error msg:

**********

--------------------------------------------------------------

- Creating web applications...

- Web app "Portal Home" already provisioned.

- Creating Site Collection "http://SPVSAS04"...

--------------------------------------------------------------

- Script aborted!

 

Exception : Microsoft.SharePoint.PowerShell.SPCmdletPipeBindExcepti

on: Cannot find an SPWebApplication object that contain

s the following Name, Id, or Url: http://SPVSAS04.

at Microsoft.SharePoint.PowerShell.SPWebApplicationP

ipeBind.Read(Boolean exactUrl)

at Microsoft.SharePoint.PowerShell.SPCmdletNewSite.I

nternalValidate()

at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessR

ecord()

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 :

**********************

our xml file has the following information:

 <WebApplication type="Portal"
                        name="Portal Home"
                        applicationPool="PortalHome"
                        applicationPoolAccount="SPDTE\SVC-SpOurSites"
                        url="http://localhost"
                        port="80"
                        AddURLToLocalIntranetZone="true"
                        databaseName="OurSites_Content01"
                        useClaims="false"
                        useBasicAuthentication="false"
                        useOnlineWebPartCatalog="false">
            <ManagedPaths>
                <ManagedPath relativeUrl="help" explicit="true" />
            </ManagedPaths>
            <SiteCollections>
                <!-- You can specify multiple site collections within a web application.
                siteUrl: URL of the site collection. Include the port if it is non default for the protocol (80/443). Do not include default ports as this will make the script fail.
                owner: Site collection owner account.
                name: Name/title of the site collection.
                description: Description of the site collection.
                SearchUrl: URL of the search site. This may be in another web application / site collection.
                CustomTemplate: Set to true if a custom template is to be used.
                Template: Name of the template to use.
                LCID: Locale ID of the language pack to use for the site collection.
                Locale: Actual locale of the site for regional settings. e.g. for UK English you use the US English LCID of 1033 but the locale en-gb.
                        If omitted, the default locale of the LCID is used.
                Time24: If true, times are displayed using a 24 hour clock. If false, AM/PM is used. If omitted, the default for the LCID is applied. -->
                <SiteCollection siteUrl="http://localhost"
                                owner="SPDTE\SVC-SpOurSites"
                                name="Our Sites"
                                description="Portal Home Site"
                                SearchUrl="http://localhost/search"
                                CustomTemplate="false"
                                Template="SPSPORTAL#0"
                                LCID="1033"
                                Locale="en-us"
                                Time24="false">
                </SiteCollection>
            </SiteCollections>
        </WebApplication>
        <WebApplication type="MySiteHost"
                        name="MySite Host"
                        applicationPool="MySites"
                        applicationPoolAccount="SPDTE\SVC-SpMySites"
                        url="http://localhost"
                        port="8080"
                        AddURLToLocalIntranetZone="true"
                        databaseName="MySites_Content01"
                        useClaims="false"
                        useBasicAuthentication="false"
                        useOnlineWebPartCatalog="false">
            <SiteCollections>
                <SiteCollection siteUrl="http://localhost:8080"
                                owner="SPDTE\SVC-SpMySites"
                                name="My Site Host"
                                description="My Site Host"
                                SearchUrl="http://localhost/search"
                                CustomTemplate="false"
                                Template="SPSMSITEHOST#0"
                                LCID="1033"
                                Locale="en-us"
                                Time24="false">
                </SiteCollection>
            </SiteCollections>
            <ManagedPaths>
                <ManagedPath relativeUrl="personal" explicit="false"/>
                <ManagedPath relativeUrl="sites" delete="true" />
            </ManagedPaths>
        </WebApplication>
    </WebApplications>

**************************************************

had a look at a similar error: http://autospinstaller.codeplex.com/discussions/266303

but unable to resolve our issue, any thoughts to resolve the above

thanks

PS

 

May 4, 2012 at 1:50 PM

I suppose that SPVSAS04 is the name of the server that you are getting the error on.

The issue is that you are using "localhost" for the Web Application name. So, when it is created on the first server it doesn't' have the name SPVSAS04 (Likely its name is localhost).

In a mutli-server install, consider not using "Localhost"   for Web Application names (or for that matter  everywhere else in the XML.