31 lines
830 B
PowerShell
31 lines
830 B
PowerShell
|
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;
|