-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathboxstarter.ps1
157 lines (132 loc) · 4.06 KB
/
boxstarter.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
function Remove-WindowsApp {
param (
[Parameter(ValueFromPipeline = $true)]
$Name
)
$Input | % {
Write-Output "Boxstarter: Removing Windows app '$_'" -Verbose
# https://github.com/Microsoft/windows-dev-box-setup-scripts/blob/master/scripts/RemoveDefaultApps.ps1
Get-AppxPackage -Name $_ -AllUsers | Remove-AppxPackage
Get-AppXProvisionedPackage -Online | ? { $_.DisplayName -like $_ } | Remove-AppxProvisionedPackage -Online
}
}
function Remove-WindowsOptionalFeature {
param (
[Parameter(ValueFromPipeline = $true)]
$Name
)
$Input | % {
Write-Output "Boxstarter: Removing Windows optional feature '$_'" -Verbose
Get-WindowsOptionalFeature -Online -FeatureName $_ `
| ? { $_.State -eq 'Enabled' } `
| Disable-WindowsOptionalFeature -Online -NoRestart
}
}
function Set-WindowsExplorerLaunchInSeparateProcess {
# Launch folder windows in a separate process
# https://github.com/mwrock/boxstarter/issues/299
Write-Output "Boxstarter: Launch Windows Explorer in separate process" -Verbose
Set-ItemProperty `
-Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced `
-Name SeparateProcess `
-Value 1
}
function Set-WindowsExplorerClickState {
# Single-click to open an item
# https://github.com/mwrock/boxstarter/issues/300
Write-Output "Boxstarter: Set Windows Explorer to single-click" -Verbose
$path = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer'
$shell_state = (Get-ItemProperty -Path $path).ShellState
$shell_state[4] = $shell_state[4] -bxor 32
Set-ItemProperty -Path $path -Name ShellState -Value $shell_state
}
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
Disable-UAC
Set-TimeZone -Name 'Eastern Standard Time'
Set-WindowsExplorerLaunchInSeparateProcess
Set-WindowsExplorerClickState
Set-TaskbarOptions -Dock Left -Size Large
Disable-BingSearch
@(
"Internet-Explorer-*"
"MediaPlayback"
"WindowsMediaPlayer"
"*Printing*"
"*SMB*"
"*WorkFolders-Client"
) | Remove-WindowsOptionalFeature
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
@(
"*.AdobePhotoshopExpress"
"*.Duolingo-LearnLanguagesforFree"
"*.EclipseManager"
"*Autodesk*"
"*BubbleWitch*"
"*Dell*"
"*Dolby*"
"*Facebook*"
"*HiddenCity*"
"*Keeper*"
"*MarchofEmpires*"
"*Minecraft*"
"*Netflix*"
"*Plex*"
"*Solitaire*"
"*Twitter*"
"*Xbox*"
"ActiproSoftwareLLC.562882FEEB491"
"king.com.CandyCrush*"
"Microsoft.3DBuilder"
"Microsoft.BingFinance"
"Microsoft.BingFinance"
"Microsoft.BingNews"
"Microsoft.BingSports"
"Microsoft.BingWeather"
"Microsoft.CommsPhone"
"Microsoft.FreshPaint"
"Microsoft.GetHelp"
"Microsoft.Getstarted"
"Microsoft.Messaging"
"Microsoft.Microsoft3DViewer"
"Microsoft.MicrosoftOfficeHub"
"Microsoft.MicrosoftStickyNotes"
"Microsoft.NetworkSpeedTest"
"Microsoft.MicrosoftOfficeHub"
"Microsoft.Print3D"
# Paint?
"Microsoft.Office.OneNote"
"Microsoft.Office.Sway"
"Microsoft.OneConnect"
"Microsoft.Print3D"
"Microsoft.SkypeApp"
"Microsoft.WindowsMaps"
"Microsoft.WindowsPhone"
"Microsoft.WindowsSoundRecorder"
"Microsoft.XboxApp"
"Microsoft.XboxIdentityProvider"
"Microsoft.ZuneMusic"
"Microsoft.ZuneVideo"
) | Remove-WindowsApp
if ($onedrive = Get-UninstallRegistryKey -SoftwareName 'Microsoft OneDrive') {
Uninstall-ChocolateyPackage `
-PackageName 'onedrive' `
-FileType 'EXE' `
-Silent '/VERYSILENT /UNINSTALL' `
-File (-split $onedrive.UninstallString)[0]
}
choco install -y `
1password `
7zip `
docker-desktop `
git `
gpg4win-light `
keybase `
vscode
choco install scansnapmanager --version 5.5.10.20160802
Install-Module -Force -Name posh-git
Install-Module -Force -Name psake
Enable-PSRemoting -Force
Enable-RemoteDesktop
Enable-UAC
Enable-MicrosoftUpdate
Install-WindowsUpdate -AcceptEula -SuppressReboots