Created
September 19, 2018 00:35
-
-
Save mrlesmithjr/acf16d9fcbd34f7912db35f6dcc71912 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
# Self-elevate the script if required | |
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { | |
if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) { | |
$CommandLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments | |
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine | |
Exit | |
} | |
} | |
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
refreshenv | |
Set-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\AppModelUnlock -Name AllowDevelopmentWithoutDevLicense -Value 1 | |
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.SkypeApp" | |
"Microsoft.WindowsSoundRecorder" | |
"*Solitaire*" | |
"Microsoft.MicrosoftStickyNotes" | |
"Microsoft.Office.Sway" | |
"Microsoft.XboxApp" | |
"Microsoft.XboxIdentityProvider" | |
"Microsoft.XboxGamingOverlay" | |
"Microsoft.XboxSpeechToTextOverlay" | |
"Microsoft.ZuneMusic" | |
"Microsoft.ZuneVideo" | |
"Microsoft.NetworkSpeedTest" | |
"Microsoft.FreshPaint" | |
"Microsoft.Print3D" | |
#Non-Microsoft | |
"*Autodesk*" | |
"*BubbleWitch*" | |
"king.com.CandyCrush*" | |
"*Dell*" | |
"*Dropbox*" | |
"*Facebook*" | |
"*Keeper*" | |
"*Netflix*" | |
"*Twitter*" | |
"*Plex*" | |
"*.Duolingo-LearnLanguagesforFree" | |
"*.EclipseManager" | |
"ActiproSoftwareLLC.562882FEEB491" # Code Writer | |
"*.AdobePhotoshopExpress" | |
"A278AB0D.DisneyMagicKingdoms" | |
"828B5831.HiddenCityMysteryofShadows" | |
); | |
foreach ($app in $applicationList) { | |
removeApp $app | |
} | |
refreshenv | |
choco install -y git -params '"/GitAndUnixToolsOnPath /WindowsTerminal"' | |
choco install -y atom | |
choco install -y vscode | |
choco install -y python | |
choco install -y python2 | |
choco install -y 7zip.install | |
choco install -y googlechrome | |
choco install -y Microsoft-Windows-Subsystem-Linux -source windowsfeatures | |
Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName Microsoft-Windows-Subsystem-Linux | |
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile ~/Ubuntu.appx -UseBasicParsing | |
Add-AppxPackage -Path ~/Ubuntu.appx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment