Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssougnez/42769217164ae20b67dc53d4faf42a70 to your computer and use it in GitHub Desktop.
Save ssougnez/42769217164ae20b67dc53d4faf42a70 to your computer and use it in GitHub Desktop.
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