-
Notifications
You must be signed in to change notification settings - Fork 1
/
boxstartercommands.ps1
120 lines (104 loc) · 4.68 KB
/
boxstartercommands.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
# Description: Boxstarter Script
# Common dev settings for desktop app development
# Most of this referenced from https://github.com/Microsoft/windows-dev-box-setup-scripts
Update-SessionEnvironment #refreshing env to recognize boxstarter install
#--- temporarily disabling UAC to avoid reboots during install, re-enable at end of script ---
Disable-UAC
#--- Configuring Windows properties ---
#--- Windows Features ---
# Show hidden files, Show protected OS files, Show file extensions
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
#--- File Explorer Settings ---
# will expand explorer to the actual folder you're in
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneExpandToCurrentFolder -Value 1
#adds things back in your left pane like recycle bin
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneShowAllFolders -Value 1
#opens PC to This PC, not quick access
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Value 1
#taskbar where window is open for multi-monitor
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarMode -Value 2
#--- Uninstall unnecessary applications that come with Windows out of the box ---
Write-Host "Uninstall some applications that come with Windows out of the box" -ForegroundColor "Yellow"
#Referenced to build script
# https://docs.microsoft.com/en-us/windows/application-management/remove-provisioned-apps-during-update
# https://github.com/jayharris/dotfiles-windows/blob/master/windows.ps1#L157
# https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
# https://gist.github.com/alirobe/7f3b34ad89a159e6daa1
# https://github.com/W4RH4WK/Debloat-Windows-10/blob/master/scripts/remove-default-apps.ps1
function removeApp {
Param ([string]$appName)
Write-Output "Trying to remove $appName"
Get-AppxPackage $appName -AllUsers | Remove-AppxPackage
Get-AppXProvisionedPackage -Online | Where DisplayName -like $appName | Remove-AppxProvisionedPackage -Online
}
$applicationList = @(
"Microsoft.BingFinance"
"Microsoft.3DBuilder"
"Microsoft.BingFinance"
"Microsoft.BingNews"
"Microsoft.BingSports"
"Microsoft.BingWeather"
"Microsoft.CommsPhone"
"Microsoft.Getstarted"
"Microsoft.WindowsMaps"
"*MarchofEmpires*"
"Microsoft.GetHelp"
"Microsoft.Messaging"
"*Minecraft*"
"Microsoft.MicrosoftOfficeHub"
"Microsoft.OneConnect"
"Microsoft.WindowsPhone"
"Microsoft.WindowsSoundRecorder"
"*Solitaire*"
"Microsoft.MicrosoftStickyNotes"
"Microsoft.Office.Sway"
"Microsoft.XboxApp"
"Microsoft.XboxIdentityProvider"
"Microsoft.ZuneMusic"
"Microsoft.ZuneVideo"
"Microsoft.NetworkSpeedTest"
"Microsoft.FreshPaint"
"Microsoft.Print3D"
"*Autodesk*"
"*BubbleWitch*"
"king.com*"
"G5*"
"*Dell*"
"*Facebook*"
"*Keeper*"
"*Netflix*"
"*Twitter*"
"*Plex*"
"*.Duolingo-LearnLanguagesforFree"
"*.EclipseManager"
"ActiproSoftwareLLC.562882FEEB491" # Code Writer
"*.AdobePhotoshopExpress"
);
foreach ($app in $applicationList) {
removeApp $app
}
#increases timeout to temporarily to solve timeout issues with long VS Studio install, set back to default at end
choco config set --name="'commandExecutionTimeoutSeconds'" --value="'36000'"
#installing helpful 3rd party software for Windows
choco install chocolateygui -y
choco install GoogleChrome -y
choco install git.install -y
#installing VS 2017 and workloads/components for FLEx9 dev environment
#see: https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community?vs-2017&view=vs-2017
#see: https://stackoverflow.com/questions/2608144/how-to-split-long-commands-over-multiple-lines-in-powershell
$argList = @(
'--add Microsoft.VisualStudio.Workload.ManagedDesktop' #.NET desktop development workload
'--add Microsoft.VisualStudio.Workload.NativeDesktop' #Desktop development with C++ workload
'--add Microsoft.VisualStudio.Workload.Python' #Python development workload
'--add Microsoft.VisualStudio.Workload.NetCoreTools' #.NET Core cross-platform development workload
'--add Microsoft.VisualStudio.Workload.Universal' #Universal Windows Platform development workload
'--add Microsoft.Component.VC.Runtime.UCRTSDK' #Windows Universal CRT SDK component
'--add Microsoft.VisualStudio.Component.Windows81SDK' #Windows 8.1 SDK component
)
choco install visualstudio2017community -y --force --package-parameters="'$argList --passive --norestart'"
#setting timeout back to default
choco config unset --name="'commandExecutionTimeoutSeconds'"
#--- reenabling critical items ---
Enable-UAC
Enable-MicrosoftUpdate
Install-WindowsUpdate -acceptEula