forked from DC-AC/SQL2016_Scripted_Install
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsql_install.ps1
More file actions
23 lines (19 loc) · 696 Bytes
/
sql_install.ps1
File metadata and controls
23 lines (19 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
& 'D:\setup.exe' /ConfigurationFile=C:\temp\ConfigurationFile.ini
# Download Ola's scripts
invoke-WebRequest https://ola.hallengren.com/scripts/MaintenanceSolution.sql -outfile c:\temp\ola.sql
$CMD = 'C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\SQLCMD.EXE'
$ARG1= '-E'
$ARG2 = '-i'
$ARG3 = 'C:\temp\ola.sql'
& $CMD $ARG1 $ARG2 $ARG3
$CMD = 'C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\SQLCMD.EXE'
$ARG1 = '-E'
$ARG2 = '-i'
$ARG3 = 'C:\temp\best_practices_run_once.sql'
& $CMD $ARG1 $ARG2 $ARG3
$CMD ='C:\Temp\SSMS-Setup-ENU.exe'
$ARG1 =' /install'
$ARG2 = '/norestart'
$ARG3 = '/quiet'
$ARG4 = '/log ssms.log'
& $CMD $ARG1 $ARG2 $ARG3 $ARG4