« Previous Next »

Thread: PowerShell IIS7 help adding bindings to a site.

Last post 08-10-2009 9:22 PM by david santistevan. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 08-10-2009, 5:28 PM

    PowerShell IIS7 help adding bindings to a site.

    I am working with a PowerShell script to add binding to an existing IIS7 site without affecting the existing bindings. The command I am using (below) works great, except it wipes out all my other bindings. Any help would be appreciated.

     appcmd set site /site.name:autodiscoverredirect /bindings:"http/xxx.xxx.xxx:80:autodiscover.$ClientEmailDomain"

    Regards,

    D

  • 08-10-2009, 9:22 PM In reply to

    Re: PowerShell IIS7 help adding bindings to a site.

    Figured it out !

    This worked:

    $BindingToAdd ="/+bindings.[protocol='http',bindinginformation='xxx.xxx.xxx.xxx:80:autodiscover."+$ClientEmailDomain+"']"
    appcmd set site /site.name:autodiscoverredirect $BindingToAdd

    BIG THUMBS UP FOR ECHOARGS !!

Page 1 of 1 (2 items)
Microsoft Communities