Created
March 2, 2016 19:55
-
-
Save FeodorFitsner/a2e945e4da9e2f40632b to your computer and use it in GitHub Desktop.
Install PostgreSQL
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
Write-Host "Installing PostgreSQL 9.4..." -ForegroundColor Cyan | |
Write-Host "Downloading..." | |
# http://www.enterprisedb.com/products-services-training/pgdownload#windows | |
$exePath = "$($env:USERPROFILE)\postgresql-9.4.5-1-windows-x64.exe" | |
(New-Object Net.WebClient).DownloadFile('http://get.enterprisedb.com/postgresql/postgresql-9.4.5-1-windows-x64.exe', $exePath) | |
Write-Host "Installing..." | |
cmd /c start /wait $exePath --mode unattended --superpassword Password12! | |
del $exePath | |
Write-Host "Setting up services..." | |
Stop-Service postgresql-x64-9.4 | |
Set-Service -Name postgresql-x64-9.4 -StartupType Manual | |
Write-Host "PostgreSQL 9.4 installed" -ForegroundColor Green |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment