42 lines
1.4 KiB
PowerShell
42 lines
1.4 KiB
PowerShell
function New-AppTierWebApplications {
|
|
<#
|
|
.SYNOPSIS
|
|
Create app tier web applications for ORB applications from the global variable $global:appTierApplications
|
|
|
|
.PARAMETER DefaultWebSiteName
|
|
The default web site name to use. This mostly only matters for SDK clients potentially. Defualts to "Default Web Site"
|
|
#>
|
|
[CmdletBinding()]
|
|
Param(
|
|
[Parameter(Mandatory=$false)]
|
|
[string]$DefaultWebSiteName = "Default Web Site"
|
|
)
|
|
|
|
$logLead = Get-LogLeadName
|
|
|
|
$site = Get-WebSite $DefaultWebSiteName
|
|
|
|
if ($null -eq $site) {
|
|
Write-Warning "$logLead : Could not find site $DefaultWebSiteName!"
|
|
Write-Host "$logLead : Make sure function Set-AppTierDefaultWebSite is called prior to attempting to create applications"
|
|
return
|
|
}
|
|
|
|
foreach ($app in $global:appTierApplications) {
|
|
|
|
$sourcePath = Join-Path -Path (Get-OrbPath) -ChildPath $app.WebAppName
|
|
if (!(Test-Path -Path $sourcePath)) {
|
|
Write-Warning "$logLead : Could not find source path: $sourcePath!"
|
|
continue
|
|
}
|
|
|
|
if ($app.WebAppName -in (Get-KnownSkipWebAppNames)) {
|
|
Write-Warning "$logLead : Skipping $($app.WebAppName) because it is in Get-KnownSkipWebAppNames"
|
|
} else {
|
|
Install-AlkamiWebApplication -WebAppName $app.WebAppName -SourcePath $sourcePath -IsLegacy
|
|
}
|
|
}
|
|
}
|
|
|
|
Set-Alias -name Create-AppTierWebApplications -value New-AppTierWebApplications;
|