We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

How to create Multiple sites using PowershellRSS

2 replies

Last post Aug 04, 2017 09:47 AM by Paul Lynch

  • How to create Multiple sites using Powershell

    Jul 26, 2017 12:09 PM|Mark McBride|LINK

    Hi All,

    I have been handed a project.

    I need to create a PowerShell script to create 60  websites on my IIS.

    They all will be using http and port 80 and the application pools will have same name as site.

    ISitename Mytest            applicationPool MyTest          Port 80 HTTP

    Does anyone have a sample script or point me in the right direction.



  • Re: How to create Multiple sites using Powershell

    Jul 27, 2017 05:35 AM|Yuk Ding|LINK

    Hi Mark McBride,

    It is unavailable to create multiple websites with the same name while the IIS could report the name has existed. In powershell, if you need to create multiple websites, you'd better put the site name in txt file then run powershell script to create websites.

    Here is the instruction about how to achieve this with web administration module:


    Remember if you were using old IIS, remember to install powershell sdk for IIS.

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.
  • Re: How to create Multiple sites using Powershell

    Aug 04, 2017 09:47 AM|Paul Lynch|LINK


    This is a good place to start :



    Paul Lynch