Skip to content

Instantly share code, notes, and snippets.

@kevduc
Last active October 6, 2021 23:24
Show Gist options
  • Save kevduc/285d2ec7b1202dcacf2a28fe4c22c5dc to your computer and use it in GitHub Desktop.
Save kevduc/285d2ec7b1202dcacf2a28fe4c22c5dc to your computer and use it in GitHub Desktop.
Deletes Windows Apps and prevents install at setup (removes app folder in "C:\Program Files\WindowsApp", frees space)
# From https://superuser.com/questions/1465089/how-do-i-delete-a-windowsapps-folder/1619744
$appname = @(
"*LinkedInforWindows*"
"*Evernote*"
"*MusicMakerJam*"
"*GetHelp*"
"*Getstarted*"
"*Microsoft3DViewer*"
"*MicrosoftOfficeHub*"
"*MicrosoftStickyNotes*"
"*MicrosoftSudoku*"
"*MixedReality*"
"*OneNote*"
"*People*"
"*Print3D*"
"*SkypeApp*"
"*Wordament*"
"*WindowsFeedbackHub*"
"*WindowsMaps*"
"*XboxApp*"
"*ZuneMusic*"
"*ZuneVideo*"
)
ForEach ($app in $appname) {
Get-AppxPackage -Name $app | Remove-AppxPackage -ErrorAction SilentlyContinue
}
ForEach ($app in $appname) {
Get-AppxProvisionedPackage -Online | Where-Object { $_.PackageName -like $app } | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment