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

Updated Removeapps script for Windows 10 1903

Posted on April 24, 2019April 3, 2021 by Jörgen Nilsson

Windows 10 1903 are now available on MSDN and it is time to deploy it and remove the builtin apps we don’t need. There are no major changes, added the two new version files “Apps18362.txt” and “Capabilities18362.txt” and a script to make it easier to extract all the builtin apps, “Getapps.ps1”.

Getapps.ps1 will create a text file in C:\temp with a list of all installed apps and remove all the blank spaces after each row so it can easily be copied to our blacklist file.

$Filename = "C:\Temp\Appx.txt"
 $Appx = Get-AppxPackage | select name
 $Appx | Out-File -FilePath $Filename
 $Apps = Get-Content $Filename
 $Apps | foreach{ $_.Trim()} | Out-File $Filename

I still remove OneNote and Sticky Notes in my sample file, they are probably needed or wanted for some so always review what is uninstalled for each new version of Windows 10. We don’t want to uninstall the good stuff.

The original post can be found here: https://ccmexec.com/2018/04/windows-10-remove-builtin-apps-script-with-multiple-version-support/

The updated script can be downloaded from Github here: Removeapps

Iit can be dowloaded here as well: https://ccmexec.com/wp-content/uploads/2019/04/RemoveApps.zip

  • RemoveApps
  • Windows10 1903
  • 4 thoughts on “Updated Removeapps script for Windows 10 1903”

    1. Neil says:
      May 3, 2019 at 12:51 am

      Thanks for continuing to update this script to include the latest set of Appx packages. I stumbled on a comment made by a user on one of your earlier posts regarding this script (https://ccmexec.com/2018/04/windows-10-remove-builtin-apps-script-with-multiple-version-support/), where there was a concern about removed packages returning which is a “bug” on pre-1803 builds. Microsoft say they have fixed this from 1803 going forward, and provided a fix for removing packages from pre-1803 releases (https://docs.microsoft.com/en-us/windows/application-management/remove-provisioned-apps-during-update). I took the challenge to adapt your script and keep the “multiple-version-support” still relevant. My alterations to your script follows:

      $Buildnr = (Get-CimInstance Win32_Operatingsystem).BuildNumber
      $Applist = Get-Content “$($PSScriptRoot)\apps$($Buildnr).txt”
      $Capabilities = Get-Content “$($PSScriptRoot)\Capabilities$($Buildnr).txt”
      $Logfile = “$env:SystemRoot\Temp\RemoveApps_$($Buildnr).log”
      Set-Content -Path $Logfile -Value “Remove builtin apps based on $applist”

      # Prevent apps from returning by adding the apps respective deprovisioning key to the registry (not required for 1803 and above)
      # Ref: https://docs.microsoft.com/en-us/windows/application-management/remove-provisioned-apps-during-update
      if ($Buildnr -le 16299) {
      $DeprovisionedRootKey = “HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned”
      If (!(Test-Path “$DeprovisionedRootKey”)) { New-Item -Path “$DeprovisionedRootKey” | Out-Null }
      }

      ForEach ($App in $Applist) {
      $App = $App.TrimEnd()
      $PackageFullName = (Get-AppxPackage $App).PackageFullName
      $ProPackageFullName = (Get-AppxProvisionedPackage -online | where {$_.Displayname -eq $App}).PackageName
      $PackageFamilyName = (Get-AppxPackage | where {$_.Name -eq $App }).PackageFamilyName

      if ($Buildnr -le 16299) {
      if ($PackageFamilyName) {
      if (!(Test-Path “$DeprovisionedRootKey\$PackageFamilyName”)) {
      “`r`nAdding deprovisioned package name to registry: $App” | Out-File -FilePath $Logfile -Append -Encoding ascii
      New-Item -Path “$DeprovisionedRootKey\$PackageFamilyName” | Out-Null
      }
      }
      }

      if ($PackageFullName) {
      “`r`nRemoving Package: $App” | Out-File -FilePath $Logfile -Append -Encoding ascii
      start-sleep -Seconds 5
      remove-AppxPackage -package $PackageFullName | Out-File -FilePath $Logfile -Append -Encoding ascii
      }
      else {
      “Unable to find package: $App” | Out-File -FilePath $Logfile -Append -Encoding ascii
      }

      if ($ProPackageFullName) {
      “`r`nRemoving Provisioned Package: $ProPackageFullName” | Out-File -FilePath $Logfile -Append -Encoding ascii
      start-sleep -Seconds 5
      Remove-AppxProvisionedPackage -online -packagename $ProPackageFullName | Out-File -FilePath $Logfile -Append -Encoding ascii
      }
      else {
      “Unable to find provisioned package: $App”| Out-File -FilePath $Logfile -Append -Encoding ascii
      }
      }

      ForEach ($Capability in $Capabilities) {
      “`r`nRemoving capability: $Capability”.Replace(” “, ” “) | Out-File -FilePath $Logfile -Append
      Remove-WindowsCapability -online -name $Capability | Out-File -FilePath $Logfile -Append -Encoding ascii
      }

      If the formatting of the script above is a mess, I have also copied the script to a public gist, here: https://gist.github.com/wizzkidd/dae414d721560d3fec8b1c652436709c

      Reply
    2. Henk says:
      June 14, 2019 at 10:26 am

      Hi Jörgen,

      the script works good, and is removing the apps in 1903, however by a lot of users it still shows the tiles from the removed apps on the machines.

      By some users the are gone after a few days, but by others they keep on stay there.

      I did not had these things in other builds.

      Are more people having this iisue?

      Henk

      Reply
    3. Docfxit says:
      October 17, 2019 at 5:28 am

      Thank you for a great script.
      I have run your script in Win 10 1903
      When I run Sysprep I get an error saying:
      DolbyLaboratories.DolbyAtmos_3.20201.255.0_x64__rz1tebttyb220 was installed for a user, but not provisioned for all users

      The package name keeps changing.
      When I run your script RemoveApps it creates the file Appx.txt
      And DolbyLaboratories isn’t in there.
      I was hoping your script would remove the provisioning for -allusers for all packages.
      I do have the machine disconnected from the internet.
      I have been trying to create a script to remove the provisioning without success.
      Do you have any idea how I can resolve this?
      Thank you

      Reply
    4. Bob says:
      May 11, 2020 at 2:40 pm

      Is there a way to apply this during an SCCM in place upgrade from an earlier release of Win 10? The upgrade reinstalls apps that were removed on the original image. I’ve added the script to the OS upgrade task sequence, but it doesn’t apply to existing user profiles.

      Reply

    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

    • Windows Servicing, Personal Teams and Success.cmd
    • Windows MDM Security Baseline – Settings Catalog
    • 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

    ©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