I have a weird issue with creating WebApps using the below script. Seemingly when I create my WebApp everything is working and looking fine. I can look in IIS and see that it is correctly configured, I can see in SP Config that the AppPool is correctly configured. BUT when I stop that pool the site is still loading and working fine. Stopping another specific AppPool (probably first created pool) will stop the site.

If I create the TestSite via the CA then it behaves properly and the site stops when stopping the assigned AppPool so it must be something with the script that differs from how the CA does things.

Can someone point me to where this could be wrong?

New-SPWebApplication -Name "Testsite" -ApplicationPool "TestAppPool" -ApplicationPoolAccount (Get-SPManagedAccount "SPDOM\setupadmin") -DatabaseServer "sp2010" -DatabaseName "TestDB" -HostHeader "testsite" -Url "http://testsite.spdom.loc" -Port 80 -AuthenticationMethod "Kerberos"

2 Answers 2


I finally found the culprit, the first web app had * bindings. Removing them fixed everything.

Start IIS, select the Sites node to discover the site with the wildcard binding and remove it.

enter image description here


If the application pool already exists, just specifying the application pool will suffice. It will use the application pool account that is already in place for that application pool.

New-SPWebApplication -Name "Testsite" -ApplicationPool "TestAppPool" -DatabaseServer "sp2010" -DatabaseName "TestDB" -HostHeader "testsite" -Url "http://testsite.spdom.loc" -Port 80 -AuthenticationMethod "Kerberos"
  • Sure, but in my example above I need to create the AppPool and not use existing. I have also tried creating it separately/beforehand and then refer to it in the script but with the same result.
    – David
    Nov 7, 2013 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.