|
| 1 | +--- |
| 2 | +title: AppX |
| 3 | +description: Removes AppX packages and prevents them from being reinstalled |
| 4 | +actions: |
| 5 | + - !writeStatus: {status: 'Removing AppX packages'} |
| 6 | + |
| 7 | + # The reason of removing those applications is that they might be sending user data, |
| 8 | + # showing unwanted content and using hardware resources. They can also simply be annoyances |
| 9 | + # that are never used. However, most of these applications can be reinstalled via |
| 10 | + # Microsoft Store in case the user needs them. |
| 11 | + |
| 12 | + # https://docs.microsoft.com/en-us/windows/application-management/apps-in-windows-10 |
| 13 | + |
| 14 | + ##################################################################################################### |
| 15 | + |
| 16 | + # Get current AppX packages to deprovision removed ones afterward |
| 17 | + - !powerShell: |
| 18 | + command: | |
| 19 | + (Get-AppxPackage).PackageFamilyName | |
| 20 | + Out-File """$([Environment]::GetFolderPath('Windows'))\AtmosphereModules\AtmospherePackagesOld.txt""" |
| 21 | + runas: currentUserElevated |
| 22 | + wait: true |
| 23 | + |
| 24 | + # AppX Microsoft Teams |
| 25 | + # Seems legacy - not in 23H2 |
| 26 | + - !taskKill: {name: 'msteams*', ignoreErrors: true} |
| 27 | + - !appx: {name: 'MicrosoftTeams*', type: family} |
| 28 | + - !registryValue: {path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications', value: 'ConfigureChatAutoInstall', data: '0', type: REG_DWORD} |
| 29 | + |
| 30 | + # New AppX Teams in 24H2 |
| 31 | + - !taskKill: {name: 'ms-teams*', ignoreErrors: true} |
| 32 | + - !appx: {name: 'MSTeams*', type: family} |
| 33 | + # 24H2 Copilot app |
| 34 | + - !appx: {name: 'Microsoft.Copilot*', type: family} |
| 35 | + |
| 36 | + # Other apps |
| 37 | + - !appx: {name: 'Clipchamp.Clipchamp*', type: family} |
| 38 | + - !appx: {name: 'Disney.37853FC22B2CE*', type: family} |
| 39 | +# - !appx: {name: 'SpotifyAB.SpotifyMusic*', type: family} # 99% sure this will uninstall someones spotify |
| 40 | + - !appx: {name: 'Microsoft.549981C3F5F10*', type: family} # Cortana |
| 41 | +# - !appx: {name: 'Microsoft.XboxApp*', type: family} # Xbox Console Companion (deprecated) |
| 42 | + - !appx: {name: 'microsoft.windowscommunicationsapps*', type: family} # Mail and Calendar |
| 43 | + - !appx: {name: 'Microsoft.MSPaint*', type: family} # Paint 3D |
| 44 | + - !appx: {name: 'Microsoft.Getstarted*', type: family} # Tips (deprecated) |
| 45 | + - !appx: {name: 'Microsoft.ZuneVideo*', type: family} # Films & TV |
| 46 | + - !appx: {name: 'MicrosoftCorporationII.MicrosoftFamily*', type: family} |
| 47 | + - !appx: {name: 'Microsoft.MixedReality.Portal*', type: family} |
| 48 | + - !appx: {name: 'Microsoft.Windows.DevHome*', type: family} |
| 49 | + - !appx: {name: 'Microsoft.BingWeather*', type: family} |
| 50 | + - !appx: {name: 'Microsoft.BingNews*', type: family} |
| 51 | + - !appx: {name: 'Microsoft.BingSearch*', type: family} |
| 52 | + - !appx: {name: 'Microsoft.OutlookForWindows*', type: family} |
| 53 | + - !appx: {name: '*OneDrive*', type: family, option: 'uninstall-oned'} |
| 54 | + - !appx: {name: 'Microsoft.GetHelp*', type: family} |
| 55 | + - !appx: {name: 'Microsoft.Microsoft3DViewer*', type: family} |
| 56 | + - !appx: {name: 'Microsoft.MicrosoftOfficeHub*', type: family} |
| 57 | + - !appx: {name: 'Microsoft.MicrosoftSolitaireCollection*', type: family} |
| 58 | + - !appx: {name: 'Microsoft.MicrosoftStickyNotes*', type: family} |
| 59 | + - !appx: {name: 'Microsoft.Office.OneNote*', type: family} |
| 60 | + - !appx: {name: 'Microsoft.People*', type: family} |
| 61 | + - !appx: {name: 'Microsoft.PowerAutomateDesktop*', type: family} |
| 62 | + - !appx: {name: 'Microsoft.ScreenSketch*', type: family, option: 'remove-snipping-tool'} |
| 63 | + - !appx: {name: 'Microsoft.SkypeApp*', type: family} |
| 64 | + - !appx: {name: 'Microsoft.Todos*', type: family} |
| 65 | + - !appx: {name: 'Microsoft.WindowsAlarms*', type: family} |
| 66 | + - !appx: {name: 'Microsoft.WindowsCamera*', type: family} |
| 67 | + - !appx: {name: 'Microsoft.WindowsFeedbackHub*', type: family} |
| 68 | + - !appx: {name: 'Microsoft.WindowsMaps*', type: family} |
| 69 | + - !appx: {name: 'Microsoft.WindowsSoundRecorder*', type: family} |
| 70 | + - !appx: {name: 'Microsoft.OutlookForWindows*', type: family} |
| 71 | + - !appx: {name: 'MicrosoftCorporationII.QuickAssist*', type: family} |
| 72 | + - !appx: {name: 'Microsoft.Windows.NarratorQuickStart*', type: family} |
| 73 | + - !appx: {name: 'Microsoft.Windows.ParentalControls*', type: family} |
| 74 | + - !appx: {name: 'Microsoft.Windows.PeopleExperienceHost*', type: family} |
| 75 | + - !appx: {name: 'Microsoft.MicrosoftEdgeDevToolsClient*', type: family} |
| 76 | + - !appx: {name: 'Microsoft.BioEnrollment*', type: family} # Windows Hello |
| 77 | + - !appx: {name: 'Microsoft.Ink.Handwriting*', type: family} |
| 78 | + - !appx: {name: 'Microsoft.Wallet*', type: family} |
| 79 | + - !appx: {name: 'Microsoft.Xbox', type: family} |
| 80 | + - !appx: {name: '*XboxApp*', type: family} |
| 81 | + - !appx: {name: '*XboxGameCallableUI*', type: family} |
| 82 | + - !appx: {name: '*GamingApp*', type: family} |
| 83 | +# - !appx: {name: '*StartMenuExperienceHost*', type: family, option: 'openshell'} keep this incase smth goes wrong |
| 84 | + - !appx: {name: '*WindowsStore*', type: family} |
| 85 | + - !appx: {name: '*StorePurchaseApp*', type: family} |
| 86 | + - !appx: {name: '*SecureAssessmentBrowser*', type: family} |
| 87 | + - !appx: {name: '*AssignedAccessLockApp*', type: family} |
| 88 | + - !appx: {name: '*OOBENetwork*', type: family} |
| 89 | + - !appx: {name: '*Apprep.Chx*', type: family} |
| 90 | + - !appx: {name: '*Global.IrisService*', type: app} |
| 91 | + - !appx: {name: '*Global.Accounts*', type: app} |
| 92 | + - !appx: {name: '*Global.ValueBanner*', type: app} |
| 93 | + - !appx: {name: '*Global.DesktopSpotlight*', type: app} |
| 94 | + - !appx: {name: '*WindowsBackup*', type: app} |
| 95 | + |
| 96 | + # Removing using AME Wizard causes issues with Cross Device Experience Host installing |
| 97 | + # - !appx: {name: 'Microsoft.YourPhone*', type: family} |
| 98 | + - !powerShell: |
| 99 | + command: | |
| 100 | + Get-AppxPackage Microsoft.YourPhone* | Remove-AppxPackage |
| 101 | + Get-AppxProvisionedPackage -Online | Where-Object { $_.DisplayName -eq 'Microsoft.YourPhone' } | Remove-AppxProvisionedPackage -Online |
| 102 | + runas: currentUserElevated |
| 103 | + wait: true |
| 104 | + option: 'remove-yourphone' |
| 105 | + - !powerShell: |
| 106 | + command: | |
| 107 | + Get-AppxPackage MicrosoftWindows.CrossDevice | Remove-AppxPackage |
| 108 | + Get-AppxProvisionedPackage -Online | Where-Object { $_.DisplayName -eq 'MicrosoftWindows.CrossDevice' } | Remove-AppxProvisionedPackage -Online |
| 109 | + runas: currentUserElevated |
| 110 | + wait: true |
| 111 | + option: 'remove-yourphone' |
| 112 | + |
| 113 | + # Prevent provisioned applications from being reinstalled |
| 114 | + # https://learn.microsoft.com/en-us/windows/application-management/remove-provisioned-apps-during-update |
| 115 | + - !powerShell: |
| 116 | + command: | |
| 117 | + $a = """$([Environment]::GetFolderPath('Windows'))\AtmosphereModules\AtmospherePackagesOld.txt""" |
| 118 | + (diff (gc $a) ((Get-AppxPackage).PackageFamilyName)).InputObject | |
| 119 | + Foreach-Object { New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned" -Name $_ -Force }; |
| 120 | + Remove-Item $a -Force |
| 121 | + runas: currentUserElevated |
| 122 | + wait: true |
| 123 | + |
| 124 | + # Clear caches of Client.CBS and more |
| 125 | + # Start menu cache is cleared later |
| 126 | + - !writeStatus: {status: 'Clearing AppX caches'} |
| 127 | + - !appx: {operation: clearCache, name: '*MicrosoftWindows.Client.CBS*'} |
| 128 | + - !appx: {operation: clearCache, name: '*Microsoft.Windows.Search*'} |
| 129 | + - !appx: {operation: clearCache, name: '*Microsoft.Windows.SecHealthUI*'} |
0 commit comments