Using PowerShell to remove Windows 10 preinstalled store app and store

The default installation of Windows 10 contains some software which, most people simply remove. This shell script automates that process and removes the Microsoft Store as well.

This script below will prompt the user to see if they want to remove each item. Then attempt removal if the user enters “Y’.

In order to download this file right-click and select “Save Link As”, it should have the extension of .ps1.

Download

clear-host
 write-host "This script will attempt to remove Windows Store Apps."
 $ar = @(
     "Microsoft.WebpImageExtension",
     "Microsoft.Wallet",
     "Microsoft.XboxSpeechToTextOverlay",
     "Microsoft.Print3D",
     "Microsoft.Messaging",
     "Microsoft.VCLibs.140.00.UWPDesktop",
     "Microsoft.VCLibs.140.00.UWPDesktop",
     "Microsoft.ScreenSketch",
     "microsoft.windowscommunicationsapps",
     "Microsoft.GetHelp",
     "Microsoft.Windows.Photos",
     "Microsoft.WindowsAlarms",
     "Microsoft.WindowsMaps",
     "Microsoft.YourPhone",
     "Microsoft.VP9VideoExtensions",
     "Microsoft.HEIFImageExtension",
     "Microsoft.Advertising.Xaml",
     "Microsoft.Advertising.Xaml",
     "Microsoft.WindowsStore"
     )
foreach($app in $ar){
$input = read-host "Do you wish to remove "$app"? Y/N"
if($input -eq "Y"){
    get-appxpackage $app -ErrorAction ignore | Remove-AppxPackage
}
$input = $null
}