Target: Remove all Built in apps from Windows 10 for example XBOX
I used the Script from Andre Picker- that can be found on technet:
https://gallery.technet.microsoft.com/Removing-Built-in-apps-65dc387b
Copy the WIM-file of your Windows 10 to an Windows 10 computer.
Start a command-line as administrator and run the script:
C:\win10_en> .\removeapps.ps1 -pathtowim .\PROD_Win10x64en.wim -selectapps $true -index 2
In my case we remove all apps except the ones marked in green:
Remove the following Built-in apps:
Do you really want to delete the following App: Microsoft.3DBuilder (Y/N): y
Delete: Microsoft.3DBuilder
Do you really want to delete the following App: Microsoft.Appconnector (Y/N): y
Delete: Microsoft.Appconnector
Do you really want to delete the following App: Microsoft.BingFinance (Y/N): y
Delete: Microsoft.BingFinance
Do you really want to delete the following App: Microsoft.BingNews (Y/N): y
Delete: Microsoft.BingNews
Do you really want to delete the following App: Microsoft.BingSports (Y/N): y
Delete: Microsoft.BingSports
Do you really want to delete the following App: Microsoft.BingWeather (Y/N): y
Delete: Microsoft.BingWeather
Do you really want to delete the following App: Microsoft.CommsPhone (Y/N): y
Delete: Microsoft.CommsPhone
Do you really want to delete the following App: Microsoft.ConnectivityStore (Y/N): y
Delete: Microsoft.ConnectivityStore
Do you really want to delete the following App: Microsoft.Getstarted (Y/N): y
Delete: Microsoft.Getstarted
Do you really want to delete the following App: Microsoft.Messaging (Y/N): y
Delete: Microsoft.Messaging
Do you really want to delete the following App: Microsoft.MicrosoftOfficeHub (Y/N): y
Delete: Microsoft.MicrosoftOfficeHub
Do you really want to delete the following App: Microsoft.MicrosoftSolitaireCollection (Y/N): y
Delete: Microsoft.MicrosoftSolitaireCollection
Do you really want to delete the following App: Microsoft.Office.OneNote (Y/N): y
Delete: Microsoft.Office.OneNote
Do you really want to delete the following App: Microsoft.Office.Sway (Y/N): y
Delete: Microsoft.Office.Sway
Do you really want to delete the following App: Microsoft.People (Y/N): y
Delete: Microsoft.People
Do you really want to delete the following App: Microsoft.SkypeApp (Y/N): y
Delete: Microsoft.SkypeApp
Do you really want to delete the following App: Microsoft.Windows.Photos (Y/N): n
Skipped: Microsoft.Windows.Photos
Do you really want to delete the following App: Microsoft.WindowsAlarms (Y/N): n
Skipped: Microsoft.WindowsAlarms
Do you really want to delete the following App: Microsoft.WindowsCalculator (Y/N): n
Skipped: Microsoft.WindowsCalculator
Do you really want to delete the following App: Microsoft.WindowsCamera (Y/N): n
Skipped: Microsoft.WindowsCamera
Do you really want to delete the following App: microsoft.windowscommunicationsapps (Y/N): y
Delete: microsoft.windowscommunicationsapps
Do you really want to delete the following App: Microsoft.WindowsMaps (Y/N): y
Delete: Microsoft.WindowsMaps
Do you really want to delete the following App: Microsoft.WindowsPhone (Y/N): y
Delete: Microsoft.WindowsPhone
Do you really want to delete the following App: Microsoft.WindowsSoundRecorder (Y/N): y
Delete: Microsoft.WindowsSoundRecorder
Do you really want to delete the following App: Microsoft.WindowsStore (Y/N): y
Delete: Microsoft.WindowsStore
Do you really want to delete the following App: Microsoft.XboxApp (Y/N): y
Delete: Microsoft.XboxApp
Do you really want to delete the following App: Microsoft.ZuneMusic (Y/N): y
Delete: Microsoft.ZuneMusic
Do you really want to delete the following App: Microsoft.ZuneVideo (Y/N): y
Delete: Microsoft.ZuneVideo
Dismount-WindowsImage…
Please wait…
Remove temporary directory…
Then take the WIM-File / Include it in your caputure or your productive task-sequence.
As we wanted also to remove the Feedback and the Support App we had to use another script. I found a tool “install_wim_tweak.exe” which allows to uninstall some of the default apps which cannot be uninstalled. Like Cortana, Freedback, Support.
The install_wim_tweak.exe utility and the code was created by Legolash2o
During the task-sequence the .cmd file is running:
Which includes the following two files in an package:
The .cmd file includes the following: