Menu
CCMEXEC.COM – Enterprise Mobility
  • Home
  • General
  • Configuration Manager
  • Windows 10
  • Intune
  • GitHub
  • Windows 11
  • About the author
CCMEXEC.COM – Enterprise Mobility

Removing built-in Apps from Windows 10 using Powershell

Posted on August 9, 2015 by Jörgen Nilsson

When deploying Windows 10 CBB in an Enterprise some of the built-in apps will need to be removed for various reasons. I have used the excellent script that Ben Hunter wrote to do this in Windows 8/8.1 here http://blogs.technet.com/b/deploymentguys/archive/2012/10/26/removing-built-in-applications-from-windows-8.aspx

It removes the install .Appx packages in the list for the logged in user and the pre-provisioned package as well which means that the app is also uninstalled from the computer.

It doesn’t work anymore in Windows 10. After some investigation the reason is that the Package name is not the same for the installed Appx package as for the pre-provisioned.
Get-Appxpackage returns “microsoft.windowscommunicationsapps_17.6106.42001.0_x64__8wekyb3d8bbwe”

Get-AppxProvisionedPackage returns “microsoft.windowscommunicationsapps_2015.6106.42001.0_neutral_~_8wekyb3d8bbwe”

So I re-wrote the script to work in Windows 10, I also wrote a simple script to list all the App names that are installed on the computer so you easily can copy them to the script. It creates a file called C:\Temp\apps.txt

$Appx = Get-AppxPackage | select name
$appx | Out-File -FilePath C:\temp\Appx.txt

The updated script that will remove the packages you have in the $Applist variable and all the pre-provisioned packages. Here is the powershell script.

$AppsList = "Microsoft.BingFinance","Microsoft.BingNews","Microsoft.BingWeather","Microsoft.XboxApp","Microsoft.SkypeApp","Microsoft.MicrosoftSolitaireCollection","Microsoft.BingSports","Microsoft.ZuneMusic","Microsoft.ZuneVideo","Microsoft.Windows.Photos","Microsoft.People","Microsoft.MicrosoftOfficeHub","Microsoft.WindowsMaps","microsoft.windowscommunicationsapps","Microsoft.Getstarted","Microsoft.3DBuilder"
ForEach ($App in $AppsList)
{
$PackageFullName = (Get-AppxPackage $App).PackageFullName
$ProPackageFullName = (Get-AppxProvisionedPackage -online | where {$_.Displayname -eq $App}).PackageName
write-host $PackageFullName
Write-Host $ProPackageFullName
if ($PackageFullName)
{
Write-Host "Removing Package: $App"
remove-AppxPackage -package $PackageFullName
}
else
{
Write-Host "Unable to find package: $App"
}
if ($ProPackageFullName)
{
Write-Host "Removing Provisioned Package: $ProPackageFullName"
Remove-AppxProvisionedPackage -online -packagename $ProPackageFullName
}
else
{
Write-Host "Unable to find provisioned package: $App"
}
}


Here is a .zip file with both scripts that can be downloaded here: download

41 thoughts on “Removing built-in Apps from Windows 10 using Powershell”

  1. Pingback: Removing built-in Apps from Windows 10 using Powershell – CCMEXEC.COM – System Center blog | busytechy
  2. Pingback: Blocking built-in apps in Windows 10 using Applocker - CCMEXEC.COM – System Center blog
  3. David Burrows says:
    August 27, 2015 at 5:43 pm

    Thank you!
    I have been searching high and low for instructions on how to remove the provisioning packages from Windows 10 that will work within Audit Mode and survive Sysprep.
    Again, Thank you!

    Reply
  4. Qeyleb says:
    September 2, 2015 at 11:46 pm

    Thank you! You have saved me a lot of time and frustration. Before finding this, I attempted to rewrite the same script by Ben Hunter, but had no success.

    Reply
  5. Pingback: Bits that don't work in 10 - Page 3
  6. Matt says:
    October 1, 2015 at 9:12 am

    Hi, If I run this script in Audit mode will the changes I make remain there? Will the apps stay deleted after following these instructions? http://www.tenforums.com/tutorials/3020-windows-10-image-customize-audit-mode-sysprep.html. ?

    Reply
    1. Jörgen Nilsson says:
      October 5, 2015 at 9:37 pm

      Hi,
      If you use the script I posted it will work even if don’t use CopyProfile as was suggested in the post you linked to.
      /Jörgen

      Reply
  7. ws2000 says:
    October 21, 2015 at 7:51 am

    Hello

    I ran your script and it worked fine in the profile I ran it in. But when I created a new profile and looked in Start > All Apps > Others every app I uninstalled was listed there. Example = @{Microsoft.BingSports_4.4.2…. With a right mouse click I can uninstall this remnant of the app. Is using DISM /Online /Remove-ProvisionedAppxPackage /PackageName: a better choice?

    Thanks

    Reply
  8. Brian says:
    November 5, 2015 at 3:22 pm

    Hi, thanks for this!!! Much appreciated. The script works great and removes the apps but it leaves some of the boxes. They appear to be dead links to the apps that were uninstalled. Any ideas how to remove these?

    Many thanks!

    Reply
  9. Ture Turist says:
    November 18, 2015 at 10:47 pm

    What command do I use in SCCM Task Sequence to run it?

    Reply
  10. Pingback: Windows 10 tiles and rubbish! - Page 2
  11. Pingback: Windows 10 - Built-In Apps entfernen - Eric Berg
  12. Youzhek says:
    December 22, 2015 at 11:04 am

    Thank you! I see the ‘November Update’ puts all this crap and more back again, but using your first script i can find the names of the new stuff and edit the second script accordingly.

    Reply
  13. Simon says:
    January 11, 2016 at 4:51 pm

    Hi,
    November update really screw everything over. The first script produces a blank txt-file for me. And manually removing provisioned appx from the image only corrects some of the apps that pops up for new users. But some of them can’t be found with neither Get-ProvisionedAppxPackage or Get-AppxPackage. I’m refering to Flipboard and Minecraft (Xbox). And some apps can be found but not removed. Geez, win10 is not ready for business!

    Reply
    1. Jörgen Nilsson says:
      January 12, 2016 at 7:46 am

      Hi,
      Some of those are not apps but only shortcuts to apps in the Store so you an get rid of them with deploying a customized Start Menu
      https://ccmexec.com/2015/09/customizing-the-windows-10-start-menu-and-add-ie-shortcut-during-osd/

      and some apps are not possible to uninstall like the Windows Feedback app and the Contact Support app, you can block them with Applocker instead.
      https://ccmexec.com/2015/08/blocking-built-in-apps-in-windows-10-using-applocker/
      /Jörgen

      Reply
  14. Simon says:
    January 12, 2016 at 8:52 am

    Wow, thanks you, I will give this a try right away!

    Any idea how to pin apps to taskbar? Prio to the November update it was possible to use the old PinnedAccplications.psm1 for Win8, but it just throws me “unknown verb” now.

    /Simon

    Reply
    1. Jörgen Nilsson says:
      January 13, 2016 at 11:12 pm

      Hi,
      Yes, I blogged that as well, https://ccmexec.com/2015/12/customizing-the-taskbar-in-windows-10-during-osd/
      /Jörgen

      Reply
  15. Pingback: Remove Universal Apps During ConfigMgr OSD « t3chn1ck
  16. Brian says:
    February 17, 2016 at 7:40 pm

    Still keep getting sysprep error/failure. The setuperr.log keeps showing “Failed to removed staged package Microsoft.BingNews_4.7.118.0_x86_8wekyb3d8bbwe: 0x80070002. I have run the two scripts and even ran commands in powershell to remove BingNews.

    Reply
  17. Faz says:
    March 16, 2016 at 12:48 pm

    I need some help, you say it removes the apps for people who have never logged into the PC or Laptop, but I still see this happening when a new users logs in?

    I would really really appreciate a reply?

    Faz

    Reply
    1. Jörgen Nilsson says:
      March 21, 2016 at 2:24 pm

      Hi,
      If the user doesn’t have profile in advance on the computer, then the Remove-AppxProvisionedPackage command removes the pre-provisioned package on the computer.. they are installed per user, are Roaming Profiles in use?
      /Jörgen

      Reply
  18. Lee says:
    March 29, 2016 at 2:59 am

    Dude,
    Excellent A+ Thank you for sharing this. Works perfectly.
    Don’t forget to run the script as admin.

    Reply
  19. Rob Eberhardt says:
    April 26, 2016 at 11:53 pm

    This script assumes that (Get-AppxPackage $App).PackageFullName will return only one version string. Here’s an example of it returning multiples:
    PS C:\> echo (get-appxPackage “microsoft.getstarted”).packagefullname
    Microsoft.Getstarted_2.6.16.0_x64__8wekyb3d8bbwe
    Microsoft.Getstarted_3.5.11.0_x64__8wekyb3d8bbwe

    I’ve seen this happen with GetStarted, XboxApp, and ZuneMusic.

    When there’s more than one, it fails like so:
    Removing Package: Microsoft.ZuneMusic
    Remove-AppxPackage : Cannot convert ‘System.String[]’ to the type ‘System.String’ required by parameter
    ‘Package’. Specified method is not supported.

    I’ve updated the script to handle this:
    ForEach ($App in $AppsList) {
    $PackageFullName = (Get-AppxPackage $App).PackageFullName
    $ProPackageFullName = (Get-AppxProvisionedPackage -online | where {$_.Displayname -eq $App}).PackageName
    write-host $PackageFullName
    Write-Host $ProPackageFullName
    if ($PackageFullName) {
    Write-Host “Removing Package: $App”
    ForEach($Ver in $PackageFullName) {
    Write-Host ” …version: $Ver”
    remove-AppxPackage -package $Ver
    }
    } else {
    Write-Host “Unable to find package: $App”
    }
    if ($ProPackageFullName) {
    Write-Host “Removing Provisioned Package: $ProPackageFullName”
    ForEach($Ver in $ProPackageFullName) {
    Write-Host ” …version: $Ver”
    Remove-AppxProvisionedPackage -online -packagename $Ver
    }
    } else {
    Write-Host “Unable to find provisioned package: $App”
    }
    }

    Here’s how the output looks with that fixed:
    Removing Package: Microsoft.ZuneMusic
    …version: Microsoft.ZuneMusic_3.6.13821.0_x64__8wekyb3d8bbwe
    …version: Microsoft.ZuneMusic_3.6.15131.0_x64__8wekyb3d8bbwe

    Reply
  20. CWSEagle says:
    May 21, 2016 at 1:45 am

    wagain, this does not seem to work with h Windows 10 professional. most organizations i have been with use Professional, not enterprise which seems what Microsoft wants you to buy!!! ugh!!!

    Reply
  21. Jeff says:
    July 27, 2016 at 4:25 pm

    This worked pretty well!! I took out the weather since I have no issue with my users having access to that. I don’t want to take all the fun new stuff from everyone…not yet at least.

    Thanks for this little script!

    Reply
  22. Config Mangler says:
    August 8, 2016 at 4:08 pm

    Anyone having problems with this since build 1607? I’ve updated my scripts with the new package names but they are not uninstalling consistently.

    Reply
    1. Jörgen Nilsson says:
      August 10, 2016 at 1:03 pm

      Hi,
      Now it works fine in my tests. what edition of Windows 10 are you using?
      /Jörgen

      Reply
  23. Dipak says:
    August 10, 2016 at 11:48 am

    I never tried this pre anniversary update but i have tried it now and Remove-AppXPackage and Remove-AppXProvisionedPackage no longer work for new users. Has anyone else come across this yet? Anyone got a workaround?

    Reply
    1. Jörgen Nilsson says:
      August 10, 2016 at 1:04 pm

      Hi,
      It works just fine for me, what are you getting for error?
      /Jörgen

      Reply
  24. Config Mangler says:
    August 11, 2016 at 11:06 am

    Working now. Had to use Remove-AppxPackage as well Remove-AppxProvisionedPackage. Previously it worked with just Remove-AppxProvisionedPackage

    Reply
  25. Gregory says:
    August 19, 2016 at 4:32 pm

    Is there a way to add an app back in>

    Reply
  26. Jeff says:
    August 24, 2016 at 7:52 pm

    This worked well… i only took out weather as I have no issue with my users using the weather app

    Reply
  27. Ian says:
    August 30, 2016 at 4:47 pm

    Testing this with W10 1607. I want to leave Photos and calculator so have amended the script accordingly. After build getting message This app has been blocked by System administrator. I am logged on as an administrator. When logging on a low rights user app doesn’t even start. Event viewer showing a GPO error for the admin but applocker hasn’t been enabled. Any thoughts?

    Reply
    1. Jörgen Nilsson says:
      September 1, 2016 at 3:26 pm

      Hi,
      Do you build the image? is it a custom image? If the script is run before the user logon then the app is not there to be installed att all. so it shouldn’t show up. are you using COpyprofile?
      /Jörgen

      Reply
  28. andrew says:
    September 30, 2016 at 4:54 pm

    working with 1607 and getting a blank txt file with the getapps script. any ideas what i might be doing wrong?

    Reply
  29. MW says:
    November 30, 2016 at 3:57 pm

    Don’t just uninstall. Take ownership of the install file. replace the install file with your own. Then deny access to install file to all the system SIDS that will do the updating. The only way Microsoft will get around that is if they start changing the file name every time they do updates.

    Example:

    echo TAKE OWNERSHIP AND DENY TO MS SIDS

    TAKEOWN /f “C:\Windows\SysWOW64\OneDriveSetup.exe”
    Del “C:\Windows\SysWOW64\OneDriveSetup.exe”
    TYPE NUL > “C:\Windows\SysWOW64\OneDriveSetup.exe”
    ICACLS “C:\Windows\SysWOW64\OneDriveSetup.exe” /inheritance:d
    ICACLS “C:\Windows\SysWOW64\OneDriveSetup.exe” /grant %username%:F
    ICACLS “C:\Windows\SysWOW64\OneDriveSetup.exe” /deny *S-1-15-2-1:F
    ICACLS “C:\Windows\SysWOW64\OneDriveSetup.exe” /deny SYSTEM:F
    ICACLS “C:\Windows\SysWOW64\OneDriveSetup.exe” /deny “NT SERVICE\TrustedInstaller”:F
    Pause

    DIR “C:\Windows\SysWOW64\OneDriveSetup.exe”
    echo SHOULD Be Zero size. LOOK LOOK LOOK, IF NOT “0” SIZE THEN RUN AGAIN!
    Pause

    Reply
  30. Jakob says:
    January 29, 2017 at 6:15 pm

    Hi

    Using Windows 10 in a multilanguage environement(A english windows 10 base image with eg. a Danish language pack offline injected) I really want to get of multiple of the default Windows apps. So i tried to use this approach in our osd task sequence running the script in online mode, it will remove the apps that I don’t want but apparently it will rename the remaining apps to their english titles(lommeregner is renamed to calculator etc.) i do experience the same thing with Nikolaj Andersens approach, unless I run the script as a loggedin user in administrator mode. Am I missing something ohow or when it should be applied? Kind regards?Jakob

    Reply
  31. Søren says:
    February 20, 2017 at 8:51 am

    Hi Jörgen.

    Is it possible to use this script in a “Standard Client Upgrade Task Sequence” in MDT when upgrading from Windows 10 1507 to 1607? and how would you use it?

    Br
    Søren

    Reply
  32. Per Wennergrund says:
    January 16, 2019 at 1:00 pm

    Hello Jörgen,
    We are in the need to uninstall one store-app (Microsoft Photo) on alot of our education laptops, because this store-app seems to call some function in the graphics drivers and the machine blue screens. Ive tried to get rid of the store-app with powershell but it only works for current user, and when I tried your script and deliver it with sccm one laptop it just hangs on “installing” in software center.
    The Windows 10 version is 1803 and above.
    Do you have any suggestion of how we can solve this?
    The laptop is around 800 HP x360, and we have an supportcase at HP but we dont know when or if they can fix a new driver version.
    But until then it would be very nice to have a powershell script which removes this app for all current and future users of the computer.
    Take Care

    Reply
    1. Jörgen Nilsson says:
      January 18, 2019 at 4:02 pm

      Ouch!!! Sounds bad.
      To uninstall it for existing users is tricky, I would divide it in to parts one that removes the pre-provisioned package which can be run under System context and that effects all new users profiles created. and on the removes the app for the user that is logged in, you could run this with GPO, Scheduled task, SCCM and so on.
      Regards,
      Jörgen

      Reply
  33. Pingback: Customizing Windows 10 for Schools – Metalhead Tech

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

My name is Jörgen Nilsson and I work as a Senior Consultant at Onevinn in Malmö, Sweden. This is my blog where I will share tips and stuff for my own and everyone elses use on Enterprise Mobility and Windows related topics.
All code is provided "AS-IS" with no warranties.

Tweets by ccmexec

Recent Posts

  • Configuring MS Edge Security Baseline v107 using Settings Catalog
  • Configuring Desktop App Installer using CSP and script?!
  • Customizing Taskbar and Start in Windows 11 22h2 with PowerShell
  • MMUGSE – physical event 2022-10-19 @Microsoft Reactor Stockholm.
  • Switch to Private Firewall profile on AAD joined when connected to specific network.

©2023 CCMEXEC.COM – Enterprise Mobility | WordPress Theme by Superb Themes
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT