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
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
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
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
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.