Fully configure Host Header for new Web Application with PowerShell

I wrote the post (Fully configure host header for Web application) 2 months ago in order to facilitate how to use host header for your Web application. Using host header allows you to make more easier using SharePoint for end-user. They just need to use friendly URL instead of remembering port number of URL.

In this post, let me share the PowerShell code I made today. PowerShell has a seduction that makes you love when you are in which.

The PowerShell helps you the following:

  • Automatically create new Web Application with Host Header
  • Automatically create new Site collection in the Web Application
  • Automatically remove and then add new binding IIS Web Server
  • Automatically create new Host A record in DNS

Check code out: http://gallery.technet.microsoft.com/scriptcenter/Fully-configure-Host-d4027a48



  1. Blatnis
    August 23, 2013 — 7:53 am

    You can`t create site that has the same url as url of host header site collection…!

    • August 23, 2013 — 10:15 am

      Hi Blatnis,

      Thanks for your commend. I only provided this script after I got it done. Just try and let me know if it doesn’t work for me.


Leave a Reply

© 2018 The Soldier of Fortune.