Last active
March 8, 2019 01:13
-
-
Save darraghjones/91988c7c9cc52bfaeaf13a53d1814d82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Disable-UAC | |
#--- Configuring Windows properties --- | |
#--- Windows Features --- | |
# Show hidden files, Show protected OS files, Show file extensions | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFullPathInTitleBar -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 | |
#--- Enable developer mode on the system --- | |
Set-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\AppModelUnlock -Name AllowDevelopmentWithoutDevLicense -Value 1 | |
# tools we expect devs across many scenarios will want | |
choco install -y vscode | |
choco install -y git --package-parameters="'/GitAndUnixToolsOnPath /WindowsTerminal'" | |
choco install -y python | |
choco install -y 7zip.install | |
choco install -y sysinternals | |
#--- Uninstall unecessary 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 DisplayNam -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 | |
} | |
choco install -y Microsoft-Hyper-V-All --source="'windowsFeatures'" | |
Enable-WindowsOptionalFeature -Online -FeatureName containers -All | |
RefreshEnv | |
choco install -y docker-for-windows | |
choco install -y vscode-docker | |
choco install -y Microsoft-Windows-Subsystem-Linux --source="'windowsfeatures'" | |
#--- Ubuntu --- | |
# TODO: Move this to choco install once --root is included in that package | |
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile ~/Ubuntu.appx -UseBasicParsing | |
Add-AppxPackage -Path ~/Ubuntu.appx | |
# run the distro once and have it install locally with root user, unset password | |
RefreshEnv | |
Ubuntu1804 install --root | |
Ubuntu1804 run apt update | |
Ubuntu1804 run apt upgrade -y | |
<# | |
NOTE: Other distros can be scripted the same way for example: | |
#--- SLES --- | |
# Install SLES Store app | |
Invoke-WebRequest -Uri https://aka.ms/wsl-sles-12 -OutFile ~/SLES.appx -UseBasicParsing | |
Add-AppxPackage -Path ~/SLES.appx | |
# Launch SLES | |
sles-12.exe | |
# --- openSUSE --- | |
Invoke-WebRequest -Uri https://aka.ms/wsl-opensuse-42 -OutFile ~/openSUSE.appx -UseBasicParsing | |
Add-AppxPackage -Path ~/openSUSE.appx | |
# Launch openSUSE | |
opensuse-42.exe | |
#> | |
#--- Browsers --- | |
choco install -y googlechrome | |
choco install -y firefox | |
#choco install -y visualstudio2017professional | |
#just for me | |
choco install -y vlc | |
choco install -y everything | |
choco install -y notepadplusplus | |
choco install -y oldcalc | |
choco install -y gitkraken | |
Enable-UAC | |
Enable-MicrosoftUpdate | |
Install-WindowsUpdate -acceptEula |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment