function New-IPSTSWebBinding { <# .SYNOPSIS Create new IPSTS web bindings #> [CmdletBinding()] Param( [Parameter(Mandatory = $true)] [string]$ipstsUrl, [Parameter(Mandatory = $false)] [Alias("CombineIPSTSAppPools")] [bool]$doCombineIPSTSAppPools ) $logLead = (Get-LogLeadName); $basePath = (Get-OrbPath); $url = (Format-Url $ipstsUrl) $ipstsSite = "IPSTS" $ipstsPath = (Join-Path $basePath "IPSTS") Write-Verbose ("$logLead : IPSTS Website Read as {0}. Site path read as {1}" -f $url, $ipstsPath) if ($doCombineIPSTSAppPools) { Write-Output ("$logLead : Combination flag present, setting application pool name to IPSTS" -f $url) $appPoolName = "IPSTS" } New-WebSite $ipstsPath $ipstsSite $appPoolName # Remove *:80:IPSTS if (Test-WebBinding $ipstsSite $ipstsSite) { Remove-WebBinding $ipstsSite $ipstsSite } New-WebBinding -Site $ipstsSite -Url $url New-WebTierHostFileEntries $url } Set-Alias -name Create-IPSTSWebBinding -value New-IPSTSWebBinding;