Advertisement
Guest User

Untitled

a guest
Dec 31st, 2021
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #requires -version 4
  2. <#
  3. .SYNOPSIS
  4.  
  5. .DESCRIPTION
  6.   Removes pre-installed apps from Windows 10
  7.   Based on https://github.com/W4RH4WK/Debloat-Windows-10/blob/master/scripts/remove-default-apps.ps1
  8.  
  9.   Do the same for the new plan
  10.  
  11. .NOTES
  12.   Version:        1.0
  13.   Author:         Alex Hirsch - http://w4rh4wk.github.io/
  14.                   Rudy Mens - https://LazyAdmin.nl
  15.   Creation Date:  4 aug 2015
  16.   Purpose/Change: Check if app exists on version
  17.                   Remove local app storage
  18. #>
  19.  
  20. Write-Output "Uninstalling default apps"
  21. $apps = @(
  22.     # default Windows 10 apps
  23.     "Microsoft.549981C3F5F10" #Cortana
  24.     "Microsoft.3DBuilder"
  25.     "Microsoft.Appconnector"
  26.     "Microsoft.BingFinance"
  27.     "Microsoft.BingNews"
  28.     "Microsoft.BingSports"
  29.     "Microsoft.BingTranslator"
  30.     "Microsoft.BingWeather"
  31.     #"Microsoft.FreshPaint"
  32.     "Microsoft.GamingServices"
  33.     "Microsoft.Microsoft3DViewer"
  34.     "Microsoft.MicrosoftOfficeHub"
  35.     "Microsoft.MicrosoftPowerBIForWindows"
  36.     "Microsoft.MicrosoftSolitaireCollection"
  37.     #"Microsoft.MicrosoftStickyNotes"
  38.     "Microsoft.MinecraftUWP"
  39.     "Microsoft.NetworkSpeedTest"
  40.     "Microsoft.Office.OneNote"
  41.     "Microsoft.People"
  42.     "Microsoft.Print3D"
  43.     "Microsoft.SkypeApp"
  44.     "Microsoft.Wallet"
  45.     #"Microsoft.Windows.Photos"
  46.     "Microsoft.WindowsAlarms"
  47.     #"Microsoft.WindowsCalculator"
  48.     "Microsoft.WindowsCamera"
  49.     "microsoft.windowscommunicationsapps"
  50.     "Microsoft.WindowsMaps"
  51.     "Microsoft.WindowsPhone"
  52.     "Microsoft.WindowsSoundRecorder"
  53.     #"Microsoft.WindowsStore"
  54.     "Microsoft.Xbox.TCUI"
  55.     "Microsoft.XboxApp"
  56.     "Microsoft.XboxGameOverlay"
  57.     "Microsoft.XboxGamingOverlay"
  58.     "Microsoft.XboxSpeechToTextOverlay"
  59.     "Microsoft.YourPhone"
  60.     "Microsoft.ZuneMusic"
  61.     "Microsoft.ZuneVideo"
  62.  
  63.     # Threshold 2 apps
  64.     "Microsoft.CommsPhone"
  65.     "Microsoft.ConnectivityStore"
  66.     "Microsoft.GetHelp"
  67.     "Microsoft.Getstarted"
  68.     "Microsoft.Messaging"
  69.     "Microsoft.Office.Sway"
  70.     "Microsoft.OneConnect"
  71.     "Microsoft.WindowsFeedbackHub"
  72.  
  73.     # Creators Update apps
  74.     "Microsoft.Microsoft3DViewer"
  75.     #"Microsoft.MSPaint"
  76.  
  77.     #Redstone apps
  78.     "Microsoft.BingFoodAndDrink"
  79.     "Microsoft.BingHealthAndFitness"
  80.     "Microsoft.BingTravel"
  81.     "Microsoft.WindowsReadingList"
  82.  
  83.     # Redstone 5 apps
  84.     "Microsoft.MixedReality.Portal"
  85.     "Microsoft.ScreenSketch"
  86.     "Microsoft.XboxGamingOverlay"
  87.     "Microsoft.YourPhone"
  88.  
  89.     # non-Microsoft
  90.     "2FE3CB00.PicsArt-PhotoStudio"
  91.     "46928bounde.EclipseManager"
  92.     "4DF9E0F8.Netflix"
  93.     "613EBCEA.PolarrPhotoEditorAcademicEdition"
  94.     "6Wunderkinder.Wunderlist"
  95.     "7EE7776C.LinkedInforWindows"
  96.     "89006A2E.AutodeskSketchBook"
  97.     "9E2F88E3.Twitter"
  98.     "A278AB0D.DisneyMagicKingdoms"
  99.     "A278AB0D.MarchofEmpires"
  100.     "ActiproSoftwareLLC.562882FEEB491" # next one is for the Code Writer from Actipro Software LLC
  101.     "CAF9E577.Plex"  
  102.     "ClearChannelRadioDigital.iHeartRadio"
  103.     "D52A8D61.FarmVille2CountryEscape"
  104.     "D5EA27B7.Duolingo-LearnLanguagesforFree"
  105.     "DB6EA5DB.CyberLinkMediaSuiteEssentials"
  106.     "DolbyLaboratories.DolbyAccess"
  107.     "DolbyLaboratories.DolbyAccess"
  108.     "Drawboard.DrawboardPDF"
  109.     "Facebook.Facebook"
  110.     "Fitbit.FitbitCoach"
  111.     "Flipboard.Flipboard"
  112.     "GAMELOFTSA.Asphalt8Airborne"
  113.     "KeeperSecurityInc.Keeper"
  114.     "NORDCURRENT.COOKINGFEVER"
  115.     "PandoraMediaInc.29680B314EFC2"
  116.     "Playtika.CaesarsSlotsFreeCasino"
  117.     "ShazamEntertainmentLtd.Shazam"
  118.     "SlingTVLLC.SlingTV"
  119.     "SpotifyAB.SpotifyMusic"
  120.     #"TheNewYorkTimes.NYTCrossword"
  121.     "ThumbmunkeysLtd.PhototasticCollage"
  122.     "TuneIn.TuneInRadio"
  123.     "WinZipComputing.WinZipUniversal"
  124.     "XINGAG.XING"
  125.     "flaregamesGmbH.RoyalRevolt2"
  126.     "king.com.*"
  127.     "king.com.BubbleWitch3Saga"
  128.     "king.com.CandyCrushSaga"
  129.     "king.com.CandyCrushSodaSaga"
  130.  
  131.     # apps which other apps depend on
  132.     "Microsoft.Advertising.Xaml"
  133. )
  134.  
  135. foreach ($app in $apps) {
  136.     Write-Output "Trying to remove $app"
  137.  
  138.     # Get the app version
  139.     $appVersion = (Get-AppxPackage -Name $app).Version
  140.  
  141.     If ($appVersion){
  142.       # If the apps is found, remove it
  143.       Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage -AllUsers
  144.     }
  145.    
  146.     # Remove the app from the local Windows Image to prevent re-install on new user accounts
  147.     Get-AppXProvisionedPackage -Online | Where-Object DisplayName -EQ $app | Remove-AppxProvisionedPackage -Online
  148.  
  149.     # Cleanup Local App Data
  150.     $appPath="$Env:LOCALAPPDATA\Packages\$app*"
  151.     Remove-Item $appPath -Recurse -Force -ErrorAction 0
  152. }
  153.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement