-
Notifications
You must be signed in to change notification settings - Fork 5
/
newCMSQLsettingsINI.ps1
62 lines (62 loc) · 3.06 KB
/
newCMSQLsettingsINI.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
function new-CMSQLsettingsINI {
param(
$domainnetbios,
$admpwd
)
$SQLHash = @{'ACTION' = '"Install"';
'SUPPRESSPRIVACYSTATEMENTNOTICE' = '"TRUE"';
'IACCEPTROPENLICENSETERMS' = '"TRUE"';
'ENU' = '"TRUE"';
'QUIET' = '"TRUE"';
'UpdateEnabled' = '"TRUE"';
'USEMICROSOFTUPDATE' = '"TRUE"';
'FEATURES' = 'SQLENGINE,RS';
'UpdateSource' = '"MU"';
'HELP' = '"FALSE"';
'INDICATEPROGRESS' = '"FALSE"';
'X86' = '"FALSE"';
'INSTANCENAME' = '"MSSQLSERVER"';
'INSTALLSHAREDDIR' = '"C:\Program Files\Microsoft SQL Server"';
'INSTALLSHAREDWOWDIR' = '"C:\Program Files (x86)\Microsoft SQL Server"';
'INSTANCEID' = '"MSSQLSERVER"';
'RSINSTALLMODE' = '"DefaultNativeMode"';
'SQLTELSVCACCT' = '"NT Service\SQLTELEMETRY"';
'SQLTELSVCSTARTUPTYPE' = '"Automatic"';
'INSTANCEDIR' = '"C:\Program Files\Microsoft SQL Server"';
'AGTSVCACCOUNT' = '"NT Service\SQLSERVERAGENT"';
'AGTSVCSTARTUPTYPE' = '"Manual"';
'COMMFABRICPORT' = '"0"';
'COMMFABRICNETWORKLEVEL' = '"0"';
'COMMFABRICENCRYPTION' = '"0"';
'MATRIXCMBRICKCOMMPORT' = '"0"';
'SQLSVCSTARTUPTYPE' = '"Automatic"';
'FILESTREAMLEVEL' = '"0"';
'ENABLERANU' = '"FALSE"';
'SQLCOLLATION' = '"SQL_Latin1_General_CP1_CI_AS"';
'SQLSVCACCOUNT' = """$domainnetbios\administrator""";
'SQLSVCPASSWORD' = """$admpwd"""
'SQLSVCINSTANTFILEINIT' = '"FALSE"';
'SQLSYSADMINACCOUNTS' = """$domainnetbios\administrator"" ""$domainnetbios\Domain Users""";
'SQLTEMPDBFILECOUNT' = '"1"';
'SQLTEMPDBFILESIZE' = '"8"';
'SQLTEMPDBFILEGROWTH' = '"64"';
'SQLTEMPDBLOGFILESIZE' = '"8"';
'SQLTEMPDBLOGFILEGROWTH' = '"64"';
'ADDCURRENTUSERASSQLADMIN' = '"FALSE"';
'TCPENABLED' = '"1"';
'NPENABLED' = '"1"';
'BROWSERSVCSTARTUPTYPE' = '"Disabled"';
'RSSVCACCOUNT' = '"NT Service\ReportServer"';
'RSSVCSTARTUPTYPE' = '"Automatic"';
}
$SQLHASHINI = @{'OPTIONS' = $SQLHash }
$SQLInstallINI = ""
Foreach ($i in $SQLHASHINI.keys) {
$SQLInstallINI += "[$i]`r`n"
foreach ($j in $($SQLHASHINI[$i].keys | Sort-Object)) {
$SQLInstallINI += "$j=$($SQLHASHINI[$i][$j])`r`n"
}
$SQLInstallINI += "`r`n"
}
return $SQLInstallINI
}