Remove Built-in apps when creating a Windows 10 reference image
When creating your reference image for Windows 10, you might want to remove the Universal Apps for various reasons. The community have come up with several scripts to accomplish this task, and don’t want to take any credit for coming up with the idea to do it with PowerShell. However, I wanted to share my version of a PowerShell script that removed the built-in apps in Windows 10.
In this script, I’ve taken another approach compared to those created by other community members. Since new versions of Windows 10 will emerge 2-3 times a year, I don’t want to update a script to support the new version that might incorporate new Universal Apps. Instead, I’m white-listing Universal Apps that I want to keep (like the Calculator), and remove everything else. In my experience, this should lead to the least amount of maintenance and that’s what I’m all about.
Script
As with the release of Windows 10 1607, a few more apps were added compared to Windows 10 version 1511. Edit the WhiteListedApps variable and make the changes that you seem fit in terms of which apps that should not be removed. As for Features on Demand, there’s also a white list of packages that won’t be removed when running the script. Edit the WhiteListOnDemand variable to fit your organizational requirements.
Update 2017-06-27: Script has been updated to only log output to RemovedApps.log file and not generate any errors that might cause MDT sequence to break.
Update 2017-03-23: Script updated with Write-LogEntry function to write to a log file called RemovedApps.log placed in C:\Windows\Temp. Applications like Quick Assist and Contact Support can now also be removed with this script. A bug has also been addressed causing the list of appx packages not to be fully populated.
# Functions function Write-LogEntry { param( [parameter(Mandatory=$true, HelpMessage="Value added to the RemovedApps.log file.")] [ValidateNotNullOrEmpty()] [string]$Value, [parameter(Mandatory=$false, HelpMessage="Name of the log file that the entry will written to.")] [ValidateNotNullOrEmpty()] [string]$FileName = "RemovedApps.log" ) # Determine log file location $LogFilePath = Join-Path -Path $env:windir -ChildPath "Temp\$($FileName)" # Add value to log file try { Add-Content -Value $Value -LiteralPath $LogFilePath -ErrorAction Stop } catch [System.Exception] { Write-Warning -Message "Unable to append log entry to RemovedApps.log file" } } # Get a list of all apps Write-LogEntry -Value "Starting built-in AppxPackage and AppxProvisioningPackage removal process" $AppArrayList = Get-AppxPackage -PackageTypeFilter Bundle -AllUsers | Select-Object -Property Name, PackageFullName | Sort-Object -Property Name # White list of appx packages to keep installed $WhiteListedApps = @( "Microsoft.DesktopAppInstaller", "Microsoft.Messaging", "Microsoft.StorePurchaseApp" "Microsoft.WindowsCalculator", "Microsoft.WindowsCommunicationsApps", # Mail, Calendar etc "Microsoft.WindowsSoundRecorder", "Microsoft.WindowsStore" ) # Loop through the list of appx packages foreach ($App in $AppArrayList) { # If application name not in appx package white list, remove AppxPackage and AppxProvisioningPackage if (($App.Name -in $WhiteListedApps)) { Write-LogEntry -Value "Skipping excluded application package: $($App.Name)" } else { # Gather package names $AppPackageFullName = Get-AppxPackage -Name $App.Name | Select-Object -ExpandProperty PackageFullName $AppProvisioningPackageName = Get-AppxProvisionedPackage -Online | Where-Object { $_.DisplayName -like $App.Name } | Select-Object -ExpandProperty PackageName # Attempt to remove AppxPackage if ($AppPackageFullName -ne $null) { try { Write-LogEntry -Value "Removing application package: $($App.Name)" Remove-AppxPackage -Package $AppPackageFullName -ErrorAction Stop | Out-Null } catch [System.Exception] { Write-LogEntry -Value "Removing AppxPackage failed: $($_.Exception.Message)" } } else { Write-LogEntry -Value "Unable to locate AppxPackage for app: $($App.Name)" } # Attempt to remove AppxProvisioningPackage if ($AppProvisioningPackageName -ne $null) { try { Write-LogEntry -Value "Removing application provisioning package: $($AppProvisioningPackageName)" Remove-AppxProvisionedPackage -PackageName $AppProvisioningPackageName -Online -ErrorAction Stop | Out-Null } catch [System.Exception] { Write-LogEntry -Value "Removing AppxProvisioningPackage failed: $($_.Exception.Message)" } } else { Write-LogEntry -Value "Unable to locate AppxProvisioningPackage for app: $($App.Name)" } } } # White list of Features On Demand V2 packages Write-LogEntry -Value "Starting Features on Demand V2 removal process" $WhiteListOnDemand = "NetFX3|Tools.Graphics.DirectX|Tools.DeveloperMode.Core|Language|Browser.InternetExplorer" # Get Features On Demand that should be removed $OnDemandFeatures = Get-WindowsCapability -Online | Where-Object { $_.Name -notmatch $WhiteListOnDemand -and $_.State -like "Installed"} | Select-Object -ExpandProperty Name foreach ($Feature in $OnDemandFeatures) { try { Write-LogEntry -Value "Removing Feature on Demand V2 package: $($Feature)" Get-WindowsCapability -Online -ErrorAction Stop | Where-Object { $_.Name -like $Feature } | Remove-WindowsCapability -Online -ErrorAction Stop | Out-Null } catch [System.Exception] { Write-LogEntry -Value "Removing Feature on Demand V2 package failed: $($_.Exception.Message)" } } # Complete Write-LogEntry -Value "Completed built-in AppxPackage and AppxProvisioningPackage removal process"
Using the script in MDT
1. Using this script is really no brainer, simply download it, call it Invoke-RemoveBuiltinApps.ps1 and place it in the %SCRIPTROOT% directory, meaning the <DeploymentShareRoot>\Scripts directory in MDT.
2. In your task sequence for Windows 10, add a Run PowerShell Script step and set the PowerShell Script field to:
%SCRIPTROOT%\Invoke-RemoveBuiltinApps.ps1
Start your reference image creation process and watch the magic happen!
(45429)

Eden Oliveira
Hi Nickolaj, Thank you for one more nice script.
I have a question, I have already my Gold image built, I normally remove those apps using DISM offline, which takes some time to mount image, perform the actions, unmount, etc.
So I was wondering, Can I use this script on my ConfigMgr 2012 Task Sequence?
If so, how should I proceed?
I believe I would need to create a package (no program) using this script, right?
At which step should I add this script to on my TS?
Thank you in advance.
Eden
Dan Padgett
just execute it as a TS step for run command line..
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -file .\script.ps1
make sure you specify a source for script
Jo Smith
I’ve been removing “windowscommunicationsapps”. Is that really an essential app? We don’t use Calendar, Mail, or Contacts/People, so I figured it wasn’t needed. I hope it doesn’t break anything.
CRoth2
A reply to this would be helpful. It seems “essential app” term may be a more general statement than an actual requirement. I too am not using Mail, Contacts, People, or Messaging, so I don’t see why the “microsoft.communicationsapps” would be needed. I am thinking he needed it because he was keeping Messaging.
Explanations as to why each is “needed” or “essential” would be helpful. And clarification as to whether “essential” means to the functioning of Windows or to the apps you have selected.
João Torres
Congratulations for your amazing script, however I have a doubt. How can I remove the apps for all users? Even if it’s a new user. Because when I deployed the captured image whit your script on the TS, I logged in for the first time on the VM with the captured image but the apps still there. I tried your script on the current user and it works like a charm, but when I change user, the apps still there for the new user.
Best Regards.
Anders
Hi
i can’t get this to work. Deployment log returns: “TSHOST: Script completed with return code 0 TaskSequencePSHost 2016-06-21 16:07:59 0 (0x0000)
” it does not remove any app at all. In task sequense it runs before pre win update.
Petr Riha
Hi & let me say THX for incredible forum at the beginning. My issue is that I tried already several options how to remove Appx from Windows 10 x64, x86 Enterprise Edt. nevertheless all new users has installed apps like CandyCrash, XBox,.. :(. Can you give me an advice where this step should be exactly situated within SCCM Task Sequence to make it working please? The same issue I am dealing with setup StartMenu modification & language settings & I hope that with some advice I will be able to solve all. Thank you in advance.
Benoit Lecours
Hi Petr,
Candy Crush and Xbox are application that are installed by the store automatically. You will need to disable Microsoft Consumer Experiences to get rid of those. See the how-to in my post (there’s a part about Start Menu as well) : https://www.systemcenterdudes.com/sccm-windows-10-customization/
Steve Whitcher
Thanks for updating this post. Do you happen to know what the each of the new built-in apps in v1607 do?
I’m guessing DesktopAppInstaller is for the upcoming feature allowing win32 apps to be installed from the store, which is definitely one to keep.
I thought that Messaging is the SMS app for mobile and for text messaging on a PC when paired with a windows mobile or android device. Do I have that wrong, or is there a reason that you consider this an essential app?
What about StorePurchaseApp, which I see that you kept, and OneConnect, which you didn’t? Any idea what either of these do?
Steve
Any way to get further information for each built-in application? Looking for specifically which each application is so we can make a meaningful decision to leave in or take out of the image.
Nickolaj
Unfortunately, I’m not aware of any such documentation. Would also like to have that information.
Sam
Does this script work offline?
I got this to work online (during the state restore phase) but will not work during the post-install phase.
John
Would this also work in Windows 8.1 for removing the build-in Metro apps? If no would it be possible for you to make it compatible with Windows 8.1 too?
Would be much appreciated!
Best regards!
STRiCT
This script was working great for us, but after a few updates it seems to be less effective. Not sure what is going on, so I am thinking it would be handy to have some sort of log output.
I am hoping you can either modify your script to output a log, or maybe provide some direction on doing so our selves?
BaardH
Have you experienced any problems when language packs are applied?
Whenever i add any kind of removal script, the translation of the computers settings get’s messed up.
AppLearner
Thank you so much for this post worked perfectly for us. Deployed this in SCCM a little different than posted.
1. Create folder in our apps share and placed the PS script there.
2. Create a Package, make sure you select “Do Not Create a Program”.
3. Add a Task – “Run PowerShell Script”, Point to package, Script name, PowerShell execution Policy to “Bypass”.
Nickolaj
Thanks for sharing how you implemented it!
Regards,
Nickolaj
Futureshock
Is this script intended to be added for the capture task sequence or for the deploy? Thanks
Nickolaj
You can add it where you think it fits in your environment. I’m mostly using it when capturing images.
Regards,
Nickolaj
Futureshock
Ok so that’s what is confusing me. So by adding it into the capture task you are then preventing it to come again at the deploy task? Or you are actually adding it at both tasks to play safe?
On the other hand, I have been using the script for deploy (added at the same phase level as you (so within custom tasks and before Enable Bitlocker) but it doesn’t work for me. My monitoring console does mark the deploy as 100% completed but in my test VM it stucks at the big blue screen “just wait a little bit more / configuring app”. I have to reboot it to get access to the deployed VM and when I check all built-in apps are still there.
Any hints or ideas?
Thank you !!
Andrew
Is this suppose to remove all Apps except the exception ones?
I am still left with Microsoft.WindowsAlarms, Microsoft.People, Microsoft.Office.OneNote and more on 1607.
Jordan Bardwell
Hello,
The script works, but throws back some errors at the end of an MDT task sequence.
The majority of the errors are “Object not set…” and there will be about 20 of these in a row. Is there a way to silence these errors?
Thanks,
Jordan
Markus
Hi Nickolaj,
thank you very much for providing your script.
i tried it out in my environment and I don’t know why, but it does not remove any apps on my systems.
I run the script as administrator and the log file is filled with removing application package – messages but when I run
PS C:\WINDOWS\system32> Get-AppxPackage -PackageTypeFilter Bundle -AllUsers | Select-Object -Property Name, PackageFullName | Sort-Object -Property Name
i see the following list of Apps, and the apps are still present in start menu:
Name PackageFullName
—- —————
Microsoft.3DBuilder Microsoft.3DBuilder_12.0.3131.0_neutral_~_8wekyb3d8bbwe
Microsoft.BingWeather Microsoft.BingWeather_4.18.52.0_neutral_~_8wekyb3d8bbwe
Microsoft.DesktopAppInstaller Microsoft.DesktopAppInstaller_1.2.2002.0_neutral_~_8wekyb3d8bbwe
Microsoft.Getstarted Microsoft.Getstarted_4.5.6.0_neutral_~_8wekyb3d8bbwe
Microsoft.Messaging Microsoft.Messaging_2.7.1001.0_neutral_~_8wekyb3d8bbwe
Microsoft.MicrosoftOfficeHub Microsoft.MicrosoftOfficeHub_2017.318.204.0_neutral_~_8wekyb3d8bbwe
Microsoft.MicrosoftSolitaireCollection Microsoft.MicrosoftSolitaireCollection_3.15.3072.0_neutral_~_8wekyb3d8bbwe
Microsoft.MicrosoftStickyNotes Microsoft.MicrosoftStickyNotes_1.7.1.0_neutral_~_8wekyb3d8bbwe
Microsoft.Office.OneNote Microsoft.Office.OneNote_2015.7967.57661.0_neutral_~_8wekyb3d8bbwe
Microsoft.OneConnect Microsoft.OneConnect_1.1607.6.0_neutral_~_8wekyb3d8bbwe
Microsoft.People Microsoft.People_2017.212.1701.0_neutral_~_8wekyb3d8bbwe
Microsoft.SkypeApp Microsoft.SkypeApp_11.12.112.0_neutral_~_kzf8qxf38zg5c
Microsoft.StorePurchaseApp Microsoft.StorePurchaseApp_11608.1000.24314.0_neutral_~_8wekyb3d8bbwe
Microsoft.Windows.Photos Microsoft.Windows.Photos_2017.214.10010.0_neutral_~_8wekyb3d8bbwe
Microsoft.WindowsAlarms Microsoft.WindowsAlarms_2017.301.1832.0_neutral_~_8wekyb3d8bbwe
Microsoft.WindowsCalculator Microsoft.WindowsCalculator_2017.301.1149.0_neutral_~_8wekyb3d8bbwe
Microsoft.WindowsCamera Microsoft.WindowsCamera_2017.125.40.0_neutral_~_8wekyb3d8bbwe
microsoft.windowscommunicationsapps microsoft.windowscommunicationsapps_2015.8021.42017.0_neutral_~_8wekyb3d8bbwe
Microsoft.WindowsFeedbackHub Microsoft.WindowsFeedbackHub_1.1702.653.0_neutral_~_8wekyb3d8bbwe
Microsoft.WindowsMaps Microsoft.WindowsMaps_2017.317.1503.0_neutral_~_8wekyb3d8bbwe
Microsoft.WindowsSoundRecorder Microsoft.WindowsSoundRecorder_2017.301.1209.0_neutral_~_8wekyb3d8bbwe
Microsoft.WindowsStore Microsoft.WindowsStore_11701.1001.794.0_neutral_~_8wekyb3d8bbwe
Microsoft.XboxApp Microsoft.XboxApp_2017.317.244.0_neutral_~_8wekyb3d8bbwe
Microsoft.XboxIdentityProvider Microsoft.XboxIdentityProvider_2016.719.1035.0_neutral_~_8wekyb3d8bbwe
Microsoft.ZuneMusic Microsoft.ZuneMusic_2019.17022.10301.0_neutral_~_8wekyb3d8bbwe
Microsoft.ZuneVideo Microsoft.ZuneVideo_2019.17022.10311.0_neutral_~_8wekyb3d8bbwe
Do you have any hints?
Thanks,
Markus
Nickolaj Andersen
Hi Markus,
I ran the updated scripts on a couple of lab Windows 10 1607 machines and the apps were removed, even without a reboot. Could you provide some more information that might be helpful regarding your environment?
Regards,
Nickolaj
Adam Mancini
Hi Nickolaj,
Great script. It has shown me how to remove Apps that I was previously stumped on because appear as “WindowsCapabilities”.
Unfortunately I believe the script is causing my sysprep to fail at the end of my build and capture:
SYSPRP Failed to remove staged package Windows.ContactSupport_10.0.14393.0_neutral_neutral_cw5n1h2txyewy:0x80070002.
SYSPRP Failed to remove apps for the current user: 0x80070002.
Have you encountered this type of problem?
Andreas Björklund
I had the same issue today.
I installed the “ContactSupport” app again with Add-WindowsCapabilities and then removed it again with Remove-WindowsCapabilities. I did this while I had the image creation suspended. Haven’t had the time to research why it did break in the first place, but I hope this little workaround works for you too!
Nickolaj Andersen
Hi Adam,
Are you suspended the Windows Stora auto-update feature to not download and update apps during reference image creation? That’s a recommendation, since it’s well known that it might break when running sysprep. You can read more about it here, although not well described:
https://support.microsoft.com/en-us/help/2769827/sysprep-fails-after-you-remove-or-update-windows-store-apps-that-include-built-in-windows-images
Johan Arwidmark also has a great post regarding this topic:
http://deploymentresearch.com/Research/Post/615/Fixing-why-Sysprep-fails-in-Windows-10-due-to-Windows-Store-updates
Regards,
Nickolaj
MikhailCompo
I am also experiencing this problem.
@Nickolaj You clearly state on this page:
http://www.scconfigmgr.com/2017/03/23/enhanced-script-for-removing-built-in-apps-when-creating-a-reference-image-for-windows-10/
and on this page
http://www.scconfigmgr.com/2016/03/01/remove-built-in-apps-when-creating-a-windows-10-reference-image/
that “Added capability to remove Features on Demand V2 applications, like Contact Support”
However, you provide no instructions for how to achieve this and myself dam Adam Mancini and Andreas Björklund clearly have issues related to this application NOT being removed.
Can you please clarify:
1) why the script does not remove this application
2) how we can use your script to remove this application.
Until I achieve this, i cannot capture a build due to this intensely frustrating “SYSPRP Failed to remove staged package Windows.ContactSupport” problem – despite applying this registry key: “HKLM\SOFTWARE\Policies\Microsoft\WindowsStore /v AutoDownload /t REG_DWORD /d 2 /f”
Thanks for any help
MikhailCompo
I no longer experience the issue “SYSPREP Failed to remove staged package Windows.ContactSupport_10.0. etc.” if i comment out the remainder of your script from “White list of Features On Demand V2 packages” onwards.
So it seems that the sysprep will succeed if I do not remove this/these applications.
Hope this helps!
Nickolaj Andersen
If you add ContactSupport to the white-list array, it will work as well.
Regards,
Nickolaj
skatterbrainz
This is increditastical! One question, why define the array $WhiteListedApps internally rather than using a separate file and Get-Content ?
Nickolaj Andersen
I’m not keen on using text files when it can be simplified directly in the script 🙂
David
Very helpful script!
On my Win10 1607 systems there are multiple flavors of many apps. For example:
Microsoft.SkypeApp_11.12.112.0_neutral_~_kzf8qxf38zg5c
Microsoft.SkypeApp_11.12.112.0_x64__kzf8qxf38zg5c
Microsoft.SkypeApp_11.12.112.0_neutral_split.scale-100_kzf8qxf38zg5c
I am curious as to why you used ‘-PackageTypeFilter Bundle’ as opposed to ‘Main, Framework’ (the default) or even ‘Main, Framework, Resource, Bundle’ and supplying a longer filter list?
Specifying the entire filter list eliminates all variations of each app.
Thank you,
David
Nickolaj Andersen
Hi David,
No particular reason, you can customize it exactly how you want. There’s no script that fits all possible scenarios. Great comment though, I should have made a note of that in the post.
Regards,
Nickolaj
Gattancha
Just ran this via ConfigMgr on a Win10 1607 install.
Worked a treat!
Kevin
Hi,
How to Exclude the StickyNotes, windows 10 Photo viewer . this are the usefull apps and getting removed.
Kevin
I would like disable windows Store , Any help ? Also when I’m trying to open the some apps on windows 10, like Edge it saying ” Microsoft Edge can’t be Opened using Built-in administartor account,Sign in with a different accunt and try” ..what exaclty it means , DO i need set up UAC control using GPO for this issue ?
Pete Mitchell
Why bother? Any apps you remove for all users will just get reinstalled during the next Windows 10 update – ie 1607 -> 1703.
Nickolaj Andersen
Hi Pete, you can run the script during the post processing step in your In-Place Upgrade task sequence so that the apps are still removed. And once RS3 hits the market, you won’t have to do that anymore.
Regards,
Nickolaj
LLN
This works great, except for one thing I ran into – it removes (?)/disables Internet Explorer. Is there a way to add that to the White List, if so, how? Thank you!
Andreas Björklund
Sure. Just add Browser.InternetExplorer to the $WhiteListOnDemand variable and you are good to go 🙂
Example:
$WhiteListOnDemand = “NetFX3|Tools.Graphics.DirectX|Tools.DeveloperMode.Core|Language|Browser.InternetExplorer”
LLN
Thanks!
Jason
Unfortunately I already ran this script and deployed to users, with Internet Explorer being removed :(. Our clients are impatient and want everything done yesterday. Is there a way to deploy internet explorer back to the users?
Jason
I ran the slightly older script that kills off internet explorer 11
Andrew
I made this mistake too. Did you find a solution to re-deploying?
Julian Rodriguez
I tried this by adding to my Windows 10 1703 reference image. After I deploy the reference image, the first user that logs on (with a new profile) has dead tiles (“e.g. P~microsoft…”). They go away after a reboot, but is there any way to prevent that from happening in the first place?
Jannis Jacobsen
We have the same issue here
Jonathan
Deploy a custom start menu..?
Greg
Same here, did you find a fix? I have tried numerous ways of modifying the DefaultLayouts.xml file and I can get the dead tiles from showing but then it defaults to showing Settings, Store and Edge. I just want a blank area with no tiles
Nickolaj Andersen
Hi Julian,
I’ve seen this as well, but I’ve not been able to figure out a solution yet.
Regards,
Nickolaj
Greg
I was using your script with 1607 with great success but am having problems in 1703. In MDT we have added IE11 but the script removes it. The log file shows: “Starting Features on Demand V2 Removal and then removes Browser.InternetExplorer~~~~0.0.11.0. I’ve tried to white lists it in the script but still have the issue.
Klaas-Wim van Diermen
For Windows 10 1703 I uses this line:
$WhiteListOnDemand = “NetFX3|Tools.Graphics.DirectX|Tools.DeveloperMode.Core|Language|Browser.InternetExplorer|Media.WindowsMediaPlayer”
After Windows 10 1703 installation was finished Internet Explorer and Windows Media Player are still present.
Andy
I used this to fix the IE missing issue but for some reason it still moved Media Player for me, any ideas?
John
Hi there, great script but it remove MS Paint and IE 11. How can we white list this?
Klaas-Wim van Diermen
$WhiteListedApps = @(
“Microsoft.MSPaint”
$WhiteListOnDemand = “NetFX3|Tools.Graphics.DirectX|Tools.DeveloperMode.Core|Language|Browser.InternetExplorer|Media.WindowsMediaPlayer”
John
That’s very useful. How would you remove Mixed Reality Portal? I can uninstall it but it still appears on the start menu
Andreas Björklund
That mixed reality things is nice, but not always. Really annoying piece of software when you really don’t need it. So I went a little mad and did the following things:
I ran a SQLite-browser as SYSTEM. Lookup the right row (ID: 3201 for me in build 16188) in the “Package” table, change the IsInbox to 0 on the row for the “Microsoft.Windows.HolographicFirstRun”-package in the “StateRepository-Machine.srd” file. You’ll find the file in C:\ProgramData\Microsoft\Windows\AppRepository .
After that it was no problem running the command in PowerShell:
Get-AppxPackage -Name ‘Microsoft.Windows.HolographicFirstRun’ | Remove-AppxPackage
Don’t know the impact it will have on the system, if any. My system is still running fine 🙂
Mark
Very nice script and I particularly like the white list idea as it makes for a straight forward way to customise the script. I have been testing this on the latest Windows 10 x64 Education v1703 wim as suggested this script is called during the State Restore of the reference build and everything appears to as expected.
# White list of appx packages to keep installed
$WhiteListedApps = @(
“Microsoft.MicrosoftStickyNotes”,
“Microsoft.MSPaint”,
“Microsoft.Windows.Photos”
“Microsoft.WindowsCalculator”,
“Microsoft.WindowsStore”
)
$WhiteListOnDemand = “NetFX3|Tools.Graphics.DirectX|Tools.DeveloperMode.Core|Language|Browser.InternetExplorer|Media.WindowsMediaPlayer”
Unfortunately the sysprep and capture fails and the C:\windows\system32\sysprep\panther\setupact.log identifies the Package Windows .ContactSupport_10.0.15063.0_neutral_neutral_cw5n1h2txyewy as the error.
I have implemented the Windows Store Update as documented here, http://deploymentresearch.com/Research/Post/615/Fixing-why-Sysprep-fails-in-Windows-10-due-to-Windows-Store-updates
Your script log shows that the features App.Support.ContactSupport~~~~0.0.1.0 & App.Support.QuickAssist~~~~0.0.1.0 have been removed and this is maybe true as there is no option to uninstall from the Apps & Features GUI.
I am unable to remove the application using the PowerShell, Remove-AppxPackage Windows .ContactSupport_10.0.15063.0_neutral_neutral_cw5n1h2txyewy as it claims this app is part of Windows and cannot be uninstalled on a per-user basis. An Administrator can attempt to remove the app from the computer using Turn Windows Features on or off.
Just hoping you could offer an insight and possible workaround so that full automation can be achieved.
Mister.Teche
@ Mark. This is a known issue when removing apps pre-sysprep. I run this script in MDT/SCCM after the OS is deployed in a task sequence. Hope this helps
mark
Hey,
Awesome script!! I was wondering how to make this apply to all new profiles created? This seems to only work on the profile deployed on, which for me is the admin account.
Thanks,
Mark.D
LLN
Hello, how to whitelist all under Windows Accessories folder? Some of these apps are still present if you search for them, however, the script knocks them off of the default list.
Jamie Dickson
I used your script as instructed in MDT for Win 1607 and my Deployment Summary has a list of “Object reference not set to an instance of an object”. When I look at the log I see no errors. It did work as expected but would like to eliminate the errors.
John Hall
I am also getting these errors; three in all.
Rob
also receiving Object not set errors but works great otherwise. Would love to hear how to eliminate those errors altogether so MDT doesn’t report errors everytime
J4FX
Would it be better to remove those apps in post install phase? Or is there a reason why you are doing it while full os is already running?
Phil
I cannot get this to work for all profiles on either 1607 or 1703 they are removed for the admin account but any other user profile just has a bunch of broken apps listed under Other
Nickolaj Andersen
Script has now been updated to address some of the issues reported in the comments.
/Nickolaj
Jeremy
I’m having to use SCCM as opposed to MDT for deployment and I have added this setup in a similar fashion as you have it here in your example images, yet still the bloat remains. Any considerations there that I may take to get this working?
Adam
Nice script!
john
this seems perfect for what i am required to do, How do i actually download the script though?
thanks
Andreas Björklund
I suggest you click (multiple times if the text doesn’t get selected the first time) on the “Toggle raw code”-button, copy the selected code to a editor of your choice and save as .ps1 🙂
There is an older version here https://github.com/NickolajA/PowerShell/blob/master/MDT/Reference%20Image/Invoke-RemoveBuiltinApps.ps1 in his brilliant repository.
ptbNO
Hi, what is the current status on this script on 1703? I’ve been working with this script the last days but I still end up with the list below on Get-AppxPackage – along with much other stuff I’d love to remove (Sway, Code Writer, Alarm and Clock, Connect, Get Help, Power BI, Network Test, Mixed Reality Portal, not able to disable Welcome Animations, App suggestions suggesting I install Karaoke(!) on a business computer.
At this point I don’t see how I can successfully deploy this OS to 60+ y.o. computer novice users-
Someone in MS must be on crack adding all this BS to an _Enterprise_ Edition. Along with the impossible apps to remove it appears the XML approach to assign file extensions doesn’t work anymore? My test-VM just said Edge snagged .PDF back :S
This is really getting quite tiering and I’m very fed up of days of work simply trying to get a clean business OS. So any updated approach or ideas on the apps I mention here would be much, much appreciated. In advance, thank you.
Get-AppxPackage results:
46928bounde.EclipseManager
AdobeSystemsIncorporated.AdobePhotoshopExpress
D5EA27B7.Duolingo-LearnLanguagesforFree
Microsoft.BingNews
Microsoft.BingWeather
Microsoft.MSPaint
Microsoft.StorePurchaseApp
Microsoft.Windows.Photos
Microsoft.WindowsAlarms
Microsoft.WindowsCalculator
Microsoft.WindowsStore
ptbNO
Ok, so an update to my comment above: Appears the script does not wipe on fullpackagename for some strange reason. After running OSD with script in SCCM task sequence I’m left with the AppX list above and things like Code Writer, Microsoft Sway, Network Test etc. Things I cannot wipe with Remove-Appx (0x80073CFA) but things that wipe fine using Remove-AppX
Mike L
I’m currently using this with my client. I had the same issue as other with the “ContactSupport” causing Sysprep to fail. So, I removed the script from the Build and Capture and I’m going to run it during OSD in ConfigMgr.
Nickolaj Andersen
Hi All,
Yeah, so it seems that there’s issues with removing the ContactSupport app. Even though I’ve stated earlier that it should work, that is not the case with the most current versions of Windows 10. These apps change from version to version, and it’s always a good idea to test this out before you simply just run the script in your environment on production systems.
When time permits, I’ll try to update the script for Windows 10 version 1709.
Regards,
Nickolaj
Steve
Nickolaj,
Thanks for sharing the script.
During a SCCM OSD TS with Windows 10 1703, I’ve found the Remove-WindowsCapability -online -name command does not work. I’ve switched to using DISM /Online /Remove-Capability /CapabilityName:. When I get a chance, I’ll test the original script with Windows 10 1709.
I will also test using the script during an image capture as ideally that’s when unwanted apps and features should be removed rather than the TS.
regards,
steve
Nickolaj Andersen
Hi Steve,
That’s weird, cause it’s worked in my tests. I’d recommend that you remove the apps in the reference image, as it makes most sense.
Regards,
Nickolaj
Michael
It looks like you forgot a comma after “Microsoft.StorePurchaseApp” within the $WhiteListedApps = @(
Yvenard
Hi Nick,
Thanks for sharing this script, when i run it part of my task sequence I am getting the following error while reviewing the log:
Get-AppxPackage : The term ‘Get-AppxPackage’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again At C:\_SMSTaskSequence\Packages\SGR000F4\AppsRemoval.ps1:26 char:17 + $AppArrayList = Get-AppxPackage -PackageTypeFilter Bundle -AllUsers | … + CategoryInfo : ObjectNotFound: (Get-AppxPackage:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
At the end it will show process completed with exit code 0 but when login apps will come back.
Can you please tell me what I am missing?
Thanks
Nickolaj Andersen
Hi Yvenard,
Where in your task sequence are you running this?
Regards,
Nickolaj
Pierre
Hello, thanks for your script, in windows 1709 i have this error in MDT :
Failed Get-WindowsCapability. error code = 0x800F0950
line \\mdt1\mdtproduction$\scripts\invoke – Remove Builtin Apps.ps 1 : 76 : 21 + $OnDemandFeatures = Get – WindowsCapability -online | where-object {$_ …
notspecified : (:) [get-windowsCapability]. ComException
Do you know how to fix this one?
Nickolaj Andersen
Hi Pierre,
Actually never seen that error before. CMTrace couldn’t even look it up either. Could you share some more information?
Regards,
Nickolaj