Last active
August 29, 2015 14:21
-
-
Save Ashex/103f38ca1f8863fa168d to your computer and use it in GitHub Desktop.
Silently install SQL Server 2014 from iso
This file contains hidden or 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
mkdir c:\temp | |
Write-Host("Install Hotfix to allow .Net 3.5 installation") | |
Invoke-WebRequest http://download.microsoft.com/download/8/0/8/80894270-D665-4E7A-8A2C-814373FC25C1/NDPFixit-KB3005628-X64.exe -OutFile c:\temp\NDPFixit-KB3005628-X64.exe | |
Start-Process "c:\temp\NDPFixit-KB3005628-X64.exe" -NoNewWindow -Wait | |
Write-Host("Enabling .NET Framework 3.5") | |
Import-Module ServerManager | |
Add-WindowsFeature Net-Framework-Core | |
Copy c:\vagrant\en_sql_server_2014_standard_edition_x64_dvd_3932034.iso c:\temp\ | |
$ImagePath = "c:\temp\en_sql_server_2014_standard_edition_x64_dvd_3932034.iso" | |
Mount-DiskImage -ImagePath $ImagePath -StorageType ISO | |
$ISODrive = (Get-DiskImage -ImagePath $ImagePath | Get-Volume).DriveLetter | |
Write-Host("Installing SQL Server 2014 Standard") | |
Start-Process "${ISODrive}:\setup.exe" '/ACTION=Install /IACCEPTSQLSERVERLICENSETERMS /Q /FEATURES=SQL,ADV_SSMS /SECURITYMODE=SQL /SAPWD="Passw0rd!" /SQLSYSADMINACCOUNTS="BUILTIN\Administrators" /INSTANCENAME=MSSQLServer /SQLSVCACCOUNT="NT Authority\Network Service"' -NoNewWindow -Wait | |
Write-Host("SQL Server 2014 Standard installed") | |
cd c:\ | |
Dismount-DiskImage -DevicePath (Get-DiskImage -ImagePath $ImagePath).DevicePath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment