-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMIM.04.Install-SyncService.ps1
More file actions
61 lines (50 loc) · 1.93 KB
/
MIM.04.Install-SyncService.ps1
File metadata and controls
61 lines (50 loc) · 1.93 KB
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
################################################################
##
## Script needs to be run 2 times
##
## 1. Install SQL Server
## 2. Install Optional SQL components
##
## Note. SSMS install takes about 15 minutes to complete
##
################################################################
#
# Grant SQL Server service account “perform volume maintenance tasks” user right in Local Security Policy (secpol.msc | Security Settings >> Local Policies >> User Rights Assignment)
# Provides Instant File Initialization (files created w/o spending time zeroing entire file size)
#
Import-Module .\FormActions.psm1
Import-Module .\Get-FileName.psm1
.\LoadDialog.ps1 -XamlPath ‘.\Forms\Install-SyncService.xaml’
#EVENT Handlers
$btnExit.add_Click({
$xamGUI.Close()
})
$btnClear.add_click({
$txtDBAlias.Clear()
$txtLogFile.Clear()
$txtMSI.clear()
$txtSyncAdmins.Clear()
$txtSyncBrowse.Clear()
$txtSyncJoiners.Clear()
$txtSyncOperators.Clear()
$txtSyncPasswordReset.Clear()
})
$btnMSI.add_click({
$txtMSI.Text = Get-FileName "C:\"
})
$btnSelectLogFile.add_click({
$txtLogFile.Text = Get-FileName "C:\"
})
$btnConfigure.add_click({
.\Deployment\Install-SyncService.ps1 -SyncAdminsIn $txtSyncAdmins.Text `
-SyncOperatorsIn $txtSyncOperators.Text `
-SyncJoinersIn $txtSyncJoiners.Text `
-SyncBrowserIn $txtSyncBrowse.Text `
-SyncPasswordResetIn $txtSyncPasswordReset.Text `
-MsiIn $txtMSI.Text`
-DBAliasIn $txtDBAlias.Text `
-LogFileIn $txtLogFile.Text | Out-Host
})
#Launch the window
$xamGUI.Title = "Install SQL Server"
$xamGUI.ShowDialog() | out-null