Menu driven Site creation?RSS

2 replies

Last post May 03, 2016 05:13 AM by raj.iis

  • Menu driven Site creation?

    Mar 02, 2012 11:41 AM|OldDog1|LINK

    So we would like to automate simple site creation as much as possible. I was thinking a simple HTA that would allow someone to fill in some blanks and then press a button to create a site.

    Basicaly the HTA would "build" the Powershell command line with variables.

    The command line would look like this:

    $SN = Site Name

    $SP = Port

    $SPP = physical Drive

    New-Item iis:\Sites\$SN -bindings @{protocol="http";bindingInformation=":$SP:`$SN"} -physicalPath $SPP

    I have built an HTA that will do this, but now I am having problems getting it to run in the correct context.

    1. I need to run the HTA as an administrator

    2. It needs to call Powershell as an administrator

    3. I believe it needs to run the commands in the iisconsole.

    It's 2 and 3 that I don't know how to do.

    If the HTA is not the way to go with this, then can someone suggest some other menu system?

    IIS 7.0 Poweshell Menu

  • Re: Menu driven Site creation?

    Mar 29, 2016 04:13 PM|websolut|LINK

    We use Octopus Deploy to accomplish similar tasks. In any case you may want to use an orchestration tool for such a task.

  • Re: Menu driven Site creation?

    May 03, 2016 05:13 AM|raj.iis|LINK

    Hi,

    You can develop a GUI using C# and execute the powershell command. If you need any further assistance let me know. 

    Regards,

    Raj