ps/Modules/Alkami.PowerShell.IIS/Public/New-ClientWebSite.ps1

31 lines
830 B
PowerShell
Raw Permalink Normal View History

2023-05-30 22:51:22 -07:00
function New-ClientWebSite {
<#
.SYNOPSIS
Create a new client web site
#>
[CmdletBinding()]
Param(
[string]$clientUrl,
[Parameter(Mandatory = $false)]
[Alias("CombineClientAppPools")]
[bool]$doCombineClientAppPools
)
$logLead = (Get-LogLeadName);
$url = (Format-Url $clientUrl)
$clientPath = (Join-Path $basePath "WebClient")
Write-Verbose ("$logLead : Clean URL Read as {0}. Site path read as {1}" -f $url, $clientPath)
if ($doCombineClientAppPools) {
Write-Output ("$logLead : Combination flag present, setting application pool name to WebClient" -f $url)
$appPoolName = "WebClient"
}
New-WebSite $clientPath $url $appPoolName
New-WebTierHostFileEntries $url
}
Set-Alias -name Create-ClientWebSite -value New-ClientWebSite;