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

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

Apr 8, 2011 at 10: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 10:19 AM

Check your input XML file:

<WebApplication type="MySiteHost"


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


Apr 11, 2011 at 2:29 PM


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

Apr 13, 2011 at 4: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.


Apr 13, 2011 at 2: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.


Apr 13, 2011 at 2: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.


Apr 13, 2011 at 3:01 PM

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