Created
July 20, 2018 20:09
-
-
Save ssougnez/42769217164ae20b67dc53d4faf42a70 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clear-Host | |
$destination = $("C:\inetpub\wwwroot\{0}{1}" -f $hostname, $port) | |
Write-Host "IIS configuration" | |
Write-Host -NoNewline "`tCreating the web application pool... " -ForegroundColor Green | |
CreateWebApplicationPool $hostname | HandleResult | |
Write-Host -NoNewline "`tCreating the IIS Site... " -ForegroundColor Green | |
CreateWebSite $hostname $port $destination | HandleResult | |
Write-Host -NoNewline "`tStopping the site... " -ForegroundColor Green | |
StopSite (GetSiteName $hostname $port) | HandleResult | |
Write-Host -NoNewline "`tStopping the application pool... " -ForegroundColor Green | |
StopWebApplicationPool $hostname | HandleResult | |
Write-Host "`nDestination folder" | |
Write-Host -NoNewline "`tExtracting files... " -ForegroundColor Green | |
ExtractSite $package $destination | HandleResult | |
Write-Host -NoNewline "`tSetting the permission... " -ForegroundColor Green | |
SetPermissions $destination $hostname | HandleResult | |
Write-Host -NoNewline "`tUpdating host file... " -ForegroundColor Green | |
EnsureHostEntry "127.0.0.1" $hostname | HandleResult | |
Write-Host -NoNewline "`tSarting the application pool... " -ForegroundColor Green | |
StartWebApplicationPool $hostname | HandleResult | |
Write-Host -NoNewline "`tStarting the site... " -ForegroundColor Green | |
StartSite (GetSiteName $hostname $port) | HandleResult | |
Write-Host "`nUmbraco" | |
Write-Host -NoNewline "`tConfiguring... " -ForegroundColor Green | |
ConfigureUmbraco (GetSiteUrl $hostname $port) $username $email $password $databaseType $sqlServer $databaseName $sqlUseIntegratedAuthentication $sqlUsername $sqlPassword | HandleResult |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment