forked from microsoft/windows-dev-box-setup-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwhc_database_server.ps1
61 lines (47 loc) · 1.8 KB
/
whc_database_server.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
# Description: Boxstarter Script
# Author: Microsoft
# Common settings for Whittet-Higgins database servers
If ($Boxstarter.StopOnPackageFailure) { $Boxstarter.StopOnPackageFailure = $false }
Disable-UAC
# Get the base URI path from the ScriptToCall value
$bstrappackage = "-bootstrapPackage"
$helperUri = $Boxstarter['ScriptToCall']
$strpos = $helperUri.IndexOf($bstrappackage)
$helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
$helperUri = $helperUri.TrimStart("'", " ")
$helperUri = $helperUri.TrimEnd("'", " ")
$helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
$helperUri += "/scripts"
Write-Host "helper script base URI is $helperUri"
function drawLine { Write-Host '------------------------------' }
function executeScript {
Param ([string]$script)
drawLine;
Write-Host "executing $helperUri/$script ..."
Invoke-Expression ((New-Object net.webclient).DownloadString("$helperUri/$script")) -ErrorAction Continue
drawLine;
RefreshEnv;
Start-Sleep -Seconds 1;
}
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
#--- Powershell Module Repository
Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted
#--- Package Manager ---
executeScript 'ConfigureChocolatey.ps1';
executeScript 'PackageManagement.ps1';
#--- Setting up Windows ---
executeScript 'SetTimeZone.ps1';
executeScript 'SetNTPDomainMember.ps1';
executeScript 'EnableIPv6.ps1';
executeScript "CommonDevTools.ps1";
#--- Setting up programs for typical every-day use
executeScript 'PasswordManager.ps1';
#--- Administrative Tools ---
executeScript 'FileAndStorageUtils.ps1'
executeScript 'ConfigureGit.ps1';
#--- Configure Powershell Profile for PSReadline ---
executeScript 'ConfigurePowerShell.ps1';
#--- reenabling critial items ---
Enable-UAC
Enable-MicrosoftUpdate
Install-WindowsUpdate -acceptEula