-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.ps1
60 lines (46 loc) · 1.77 KB
/
setup.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
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -All
Restart-Computer -Force
# Install choco
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco feature enable -n=allowGlobalConfirmation
choco install googlechrome
choco install 7zip.install
choco install git.install
choco install sysinternals
choco install visualstudiocode
choco install cmder
choco install tortoisegit
choco install jdk8
choco install skype
choco install fiddler
choco install ilspy
choco install nodejs.install
# Installl Office
# Installl Visual Studio
choco install resharper
(new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex
Install-Module posh-git
# Install IIS - All features - Only for dev machine
Enable-WindowsOptionalFeature -Online -FeatureName IIS-* -All
Import-Module WebAdministration
# Remove defaults
Remove-WebAppPool -Name *
Remove-Website -Name *
# Create Default AppPool and Default Site
New-WebAppPool -Name DefaultPool
New-Website -Name Default -Port 80 -PhysicalPath C:\inetpub\wwwroot\ -ApplicationPool DefaultPool
# Add HTTPS binding
New-WebBinding -Name Default -Protocol https
# Create self-signed certificate
$cert = New-SelfSignedCertificate -DnsName localhost, $env:COMPUTERNAME -CertStoreLocation Cert:\LocalMachine\My
# Trust it
$rootStore = New-Object System.Security.Cryptography.X509Certificates.X509Store -ArgumentList Root, LocalMachine
$rootStore.Open("MaxAllowed")
$rootStore.Add($cert)
$rootStore.Close()
# And add to binding
pushd IIS:\SslBindings
$cert | New-Item 0.0.0.0!443
popd