Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Adding multiple bindings with xWebAdministration

$
0
0

The below worked for me:

$sitename = "MainWebSite" 
xWebsite MainHTTPWebsite  
{  
    Ensure          = "Present"  
    Name            = $sitename
    ApplicationPool = "MainAppPool" 
    State           = "Started"  
    PhysicalPath    = "C:\path\to\files"  
    BindingInfo     = @(
                        @(MSFT_xWebBindingInformation   
                            {  
                                Protocol              = "HTTP"
                                Port                  =  80 
                                HostName              = "www.domain.tld"
                            }
                        );
                        @(MSFT_xWebBindingInformation
                            {
                                Protocol              = "HTTPS"
                                Port                  = 443
                                HostName              = "www.domain.tld"
                            }
                        )
                      )
    #DependsOn       = "[File]copyWebFiles"  
}

Viewing all articles
Browse latest Browse all 13067

Trending Articles