/
Install-HYDSQLServer2014.ps1
31 lines (22 loc) · 1.25 KB
/
Install-HYDSQLServer2014.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<#
************************************************************************************************************************
Created: 2015-03-01
Version: 1.1
Disclaimer:
This script is provided "AS IS" with no warranties, confers no rights and
is not supported by the author or DeploymentArtist.
Author - Johan Arwidmark
Twitter: @jarwidmark
Blog : http://deploymentresearch.com
************************************************************************************************************************
#>
$SQLSetupFile = "C:\Setup\SQL Server 2014 Standard with SP1 x64\Setup.exe"
$SQLConfigurationFile = "C:\Setup\Scripts\HYDSQL2014Unattend.ini"
# Validation
if (!(Test-Path -path $SQLSetupFile)) {Write-Warning "Could not find SQL Server 2014 setup files, aborting...";Break}
if (!(Test-Path -path $SQLConfigurationFile)) {Write-Warning "Could not find SQL Server 2014 Unattend file, aborting...";Break}
if (!(Test-Path -path G:\)) {Write-Warning "Could not find SQL TempDB Volume, aborting...";Break}
if (!(Test-Path -path H:\)) {Write-Warning "Could not find SQL DB Volume, aborting...";Break}
if (!(Test-Path -path I:\)) {Write-Warning "Could not find SQL Logs Volume, aborting...";Break}
# Install SQL
& $SQLSetupFile /configurationfile=$SQLConfigurationFile