is it possible to create two webapplication with the same Port on IIS in PowerShell. I belive it's not extending webapplication. Each Webapplication has her own content data base. Any idea doing that with PowerShell.

2 Answers 2


As long as you use Host Headers for both web applications, you should be fine.

Take a look at the New-SPWebapplication cmdlt and be sure to specify the hostheader parameter when creating the web applications.

  • you are right this is the powerShell Code if any one need it : New-SPWebApplication -Name "WebApp" -ApplicationPool "WebApp" -AuthenticationMethod "NTLM" -HostHeader sharepoint.webapp.com -URL "webapp.com" -ApplicationPoolAccount (Get-SPManagedAccount "DEV\spfarm") -Port 2525 -DatabaseServer SRVDEV -DatabaseName WSS_Content_WebApp and for the second you have to change the names and save the same port
    – Imen Turki
    Feb 1, 2016 at 17:01
  • Correct, but is this for 2013 you want to use claims as authentication method. And don't forget the DNS entries as Waqas mentions below. :) Feb 2, 2016 at 8:58

You need two HostHeaders( DNS), then you can create more than one Web App on single Port.

I.e If you have www.abc.com and www.efg.com, On the Web Application Creation Page. Enter the Name of Web app, Port Number and HostHeader.


Your Answer

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

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