forked from art2003/chocolatey_test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap_machine.ps1
90 lines (87 loc) · 5.54 KB
/
bootstrap_machine.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope Process -ErrorAction Stop
try {
#install chocolatey
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
choco install dotnet4.5.1
choco install aspnetmvc4.install
choco windowsfeatures NetFx4ServerFeatures
choco windowsfeatures NetFx4
choco windowsfeatures NetFx4Extended-ASPNET45
choco windowsfeatures MicrosoftWindowsPowerShellRoot
choco windowsfeatures MicrosoftWindowsPowerShell
choco windowsfeatures ServerCore-FullServer
choco windowsfeatures IIS-WebServerRole
choco windowsfeatures IIS-WebServer
choco windowsfeatures IIS-CommonHttpFeatures
choco windowsfeatures IIS-Security
choco windowsfeatures IIS-RequestFiltering
choco windowsfeatures IIS-StaticContent
choco windowsfeatures IIS-DefaultDocument
choco windowsfeatures IIS-DirectoryBrowsing
choco windowsfeatures IIS-HttpErrors
choco windowsfeatures IIS-HttpRedirect
choco windowsfeatures IIS-ApplicationDevelopment
choco windowsfeatures IIS-NetFxExtensibility45
choco windowsfeatures IIS-ISAPIExtensions
choco windowsfeatures IIS-ISAPIFilter
choco windowsfeatures IIS-ASPNET45
choco windowsfeatures IIS-HealthAndDiagnostics
choco windowsfeatures IIS-HttpLogging
choco windowsfeatures IIS-Performance
choco windowsfeatures IIS-HttpCompressionStatic
choco windowsfeatures IIS-WebServerManagementTools
choco windowsfeatures IIS-ManagementConsole
choco windowsfeatures WCF-Services45
choco windowsfeatures WCF-TCP-PortSharing45
choco windowsfeatures User-Interfaces-Infra
choco windowsfeatures Server-Gui-Mgmt
choco windowsfeatures RSAT
choco windowsfeatures WindowsServerBackupSnapin
choco windowsfeatures Printing-Client
choco windowsfeatures Printing-Client-Gui
choco windowsfeatures MicrosoftWindowsPowerShellISE
choco windowsfeatures Server-Gui-Shell
choco windowsfeatures Internet-Explorer-Optional-amd64
choco windowsfeatures KeyDistributionService-PSH-Cmdlets
choco windowsfeatures TlsSessionTicketKey-PSH-Cmdlets
choco windowsfeatures MicrosoftWindowsPowerShellV2
choco windowsfeatures Server-Psh-Cmdlets
choco windowsfeatures ServerCore-WOW64
choco windowsfeatures ServerCore-EA-IME-WOW64
choco windowsfeatures FileAndStorage-Services
choco windowsfeatures Storage-Services
choco windowsfeatures Printing-XPSServices-Features
choco windowsfeatures ServerCore-EA-IME
choco windowsfeatures ServerCore-Drivers-General
choco windowsfeatures Server-Drivers-General
choco windowsfeatures Server-Drivers-Printers
choco windowsfeatures SmbDirect
choco windowsfeatures SMB1Protocol
choco install aspnetmvc4.install
choco install ISAPIRewrite
#newrelic
choco install Mdsol_NewRelic -packageParameters "x64_3.11.296.0" -force -source C:\test\Mdsol_NewRelic
try
{
choco install sumologic
}
catch {
Start-Sleep -s 10
write-host "attempt sumologic installation second time"
choco install sumologic
}
Finally{
#need to run second time. First time it fails all the time and cach block does not work
Start-Sleep -s 10
write-host "attempt final sumologic installation"
choco install sumologic -force
}
choco install webdeploy
choco install webpi
choco install isapirewrite
Write-ChocolateySuccess '__NAME__'
}
catch {
Write-ChocolateyFailure '__NAME__' $($_.Exception.Message)
throw
}