New-SPWebApplication : ApplicationPool exists, either specify an existing ApplicationPool alone, or specify a non existing ApplicatioPool and an ApplicationPoolAccount.

Apr 8, 2011 at 9:37 PM

I am getting the below error, whenever I run the script.  It is happening when it creates the MySite app pool.  When I look at the script I do not see where you are setting $MySiteAppPool.

Anyone else having this problem?

Apr 11, 2011 at 9:19 AM

Check your input XML file:

<WebApplication type="MySiteHost"
                        name="MySiteHost"
                        applicationPool="MySites"

 

Is the applicationPool attribute the same as any other web applications you've defined?

 

Apr 11, 2011 at 1:29 PM

No,

They aredifferent.  I looked in the MySite script function and it does not even look at the applicationPool attribute.

Coordinator
Apr 13, 2011 at 3:44 AM

Actually (and confusingly) the My Site web app and site collection are created earlier on, by the CreateWebApp function. The script code within the User Profile App is kind of left over from v1 of AutoSPInstaller and normally wouldn't be used.

Brian


Apr 13, 2011 at 1:08 PM

Hey Brian,

Here is the part I am looking at:

New-SPWebApplication -Name $MySiteName -ApplicationPoolAccount $MySiteAppPoolAcct -ApplicationPool $MySiteAppPool -DatabaseName $MySiteDB -HostHeader $MySiteHostHeader -Url $MySiteURL -Port $MySitePort -SecureSocketsLayer: $MySiteUseSSL | Out-Null

Nowhere in your script do you ever set $MySiteAppPool, I even did a search through your scripts, and none of the files set $MySiteAppPool. If I am crazy and missed something, please tell me, it wouldn't have been the first time.

Rick

Coordinator
Apr 13, 2011 at 1:21 PM

Like I said, that line never gets used because the MySites web app instead gets created by the same function as the Portal web app, earlier on. This discussion just reminds me that I probably need to remove the line(s) you refer to above.

Brian

Apr 13, 2011 at 2:01 PM

That might be a good Idea, I was a little confused when I was looking over the script.