ps/Modules/Alkami.PowerShell.IIS/Public/New-IPSTSWebSite.ps1
2023-05-30 22:51:22 -07:00

30 lines
805 B
PowerShell

function New-IPSTSWebSite {
<#
.SYNOPSIS
Create a new IPSTS web site
#>
[CmdletBinding()]
Param(
[string]$ipstsUrl,
[Parameter(Mandatory = $false)]
[Alias("CombineIPSTSAppPools")]
[bool]$doCombineIPSTSAppPools
)
$logLead = (Get-LogLeadName);
$url = (Format-Url $ipstsUrl)
$ipstsPath = (Join-Path $basePath "IPSTS")
Write-Verbose ("$logLead : Clean URL 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 $url $appPoolName
New-WebTierHostFileEntries $url
}
Set-Alias -name Create-IPSTSWebSite -value New-IPSTSWebSite;