Last active
April 19, 2022 15:10
-
-
Save Jawabiscuit/5b17033908c8f40cb78f45339923c5fa to your computer and use it in GitHub Desktop.
Uninstall unnecessary windows apps.
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
#--- Uninstall unnecessary applications that come with Windows out of the box --- | |
# Run in powershell, not pwsh | |
Write-Host "Uninstall some applications that come with Windows out of the box" -ForegroundColor "Yellow" | |
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 = @( | |
"Disney*" | |
"Microsoft.3DBuilder" | |
"Microsoft.BingWeather" | |
"Microsoft.GetHelp" | |
"Microsoft.Getstarted" | |
"Microsoft.Microsoft3DViewer" | |
"Microsoft.MicrosoftOfficeHub" | |
"Microsoft.MicrosoftSolitaireCollection" | |
"Microsoft.MicrosoftStickyNotes" | |
"Microsoft.MixedReality.Portal" | |
"Microsoft.Office.OneNote" | |
"Microsoft.People" | |
"Microsoft.ScreenSketch" | |
"Microsoft.SkypeApp" | |
"Microsoft.Wallet" | |
"Microsoft.WindowsMaps" | |
"Microsoft.Xbox.TCUI" | |
"Microsoft.XboxApp" | |
"Microsoft.XboxGameOverlay" | |
"Microsoft.XboxGamingOverlay" | |
"Microsoft.XboxIdentityProvider" | |
"Microsoft.XboxSpeechToTextOverlay" | |
"Microsoft.YourPhone" | |
"Microsoft.Zune*" | |
); | |
foreach ($app in $applicationList) { | |
removeApp $app | |
} | |
# Remove all Python Windows App bootstrappers | |
$WindowsAppDir = "$env:LOCALAPPDATA\Microsoft\WindowsApps" | |
if (Test-Path $WindowsAppDir) { | |
Get-ChildItem -File $WindowsAppDir | Where-Object { | |
$_.Name -like "python*.exe" | |
} | ForEach-Object { | |
Write-Host "Removing $_" -ForegroundColor Green | |
Remove-Item -Force $_ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment