none
How to actually remove unwanted apps in Windows 10 1703 ??? RRS feed

  • Question

  • Hi everyone, 

    so I am about to start deploying Windows 10 1703 Enterprise on several hundred computers and I am really scratching my head on how to proceed here. Scratching my head on what MS is thinking these days as well. Putting Candy Crush, XBOX and a list of other stuff on Enterprise edition of the OS is not OK.   

    I have played around with different powershell scripts in my SCCM task sequence, the lastest one being the one on this blog. But since MS have blocked removal of so many apps with regular Remove-AppX commands I'm still stuck with a start menu where 2/3 is stuff we do not want/need. With MS suggesting my users to install a Karaoke (!) app etc. Bottom line, deploying such an OS to 60+ y.o. computer novice users is simply not going to work and I badly need a proper solution.

    I see there are some rather angry/"nasty" scripts that removes everything in a combination of PS Remove-AppX, killing services, deleting files, making registry changes etc, but that seems over the top.

    What I need is a way to deliver a clean business OS in a safe way (hence not killing apps/services that might be crucial for the OS to work at some point) and something I will be able to maintain in the future. Worth noting is that I do OSD to both domain & non-domain and need a proper solution for both (hence no GPO)

    All tips, ideas & help much appreciated.

    • Edited by ptbNO Thursday, October 19, 2017 7:00 AM
    Thursday, October 12, 2017 12:40 PM

Answers


  • I am creating the XML based on a reference computer, and I cannot "unpin" items that are installed from the start menu.

    You can unpin icons from start screen (how ever you want to call it), which is first visible part for an end user. If he scrolls down the entire menu or use search, he will find that app you can´t get rid off.

    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!

    Thursday, October 19, 2017 6:15 AM

All replies

  • Hello, 

    Have you tried below blog post which show us a way to removing windows 10 in-box apps during a task sequence both online and offline? It's still using PowerShell commands Remove-APPXProvisionedPackage, so not sure if it works or not on your case.

    https://blogs.technet.microsoft.com/mniehaus/2015/11/11/removing-windows-10-in-box-apps-during-a-task-sequence/


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, October 13, 2017 10:39 AM
    Moderator
  • Hi and thank you for your reply. This is the first script I tried, although I am running it in my SCCM task sequence, not in MDT. It still left me with a lot of apps plus this script had a strange effect on Office 2013 SP1 (which also is part of my SCCM task sequence): HKCU\Software\Microsoft\Office subkey did not appear in Registry afterwards when testing OSD to a Hyper-V VM. As soon as Michael Niehaus' RemoveApps.ps1 script was replaced in SCCM task sequence they Office Registry subkey appeared like it should.

    Although the main issue seems to be that Microsoft is not allowing us to remove certain stuff with Remove-AppxPackage / Remove-AppxProvisionedPackage which both Michael Niehaus' script and the one I linked to are based on. I.e. Ecplise Manager: In UI I have the option to uninstall but when using Remove-AppXPackage I get

    Remove-AppxPackage -Package 46928bounde.EclipseManager
    Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CFA, Removal failed. Please contact your software vendor. (
    Exception from HRESULT: 0x80073CFA)

    The second issue is that some things I would like to remove are not listed on Get-AppX, i.e. Sway, Network Test, Power BI, Mixed Reality Portal, Code Writer etc)


    • Edited by ptbNO Friday, October 13, 2017 1:07 PM
    Friday, October 13, 2017 1:06 PM
  • Old scripts do not work with newer builds. My 1607 set worked only partly with 1703. For 1703, I used this script, works fine: https://gal.vin/2017/04/06/removing-uwp-apps-mdt/

    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!

    Friday, October 13, 2017 3:42 PM
  • Old scripts do not work with newer builds. My 1607 set worked only partly with 1703. For 1703, I used this script, works fine: https://gal.vin/2017/04/06/removing-uwp-apps-mdt/

    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!

    Hi yannara, thanks for the reply and thank you for URL to an updated blog. Although these PS scripts still use Remove-AppxPackage -Package / Remove-AppxProvisionedPackage -Online -PackageName. So unless I'm missing something here I don't see how it can solve the issue with 0x80073CFA:

    S C:\WINDOWS\system32> Remove-AppxPackage -Package Microsoft.Office.Sway
    Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CFA, Removal failed. Please contact your software vendor. (
    Exception from HRESULT: 0x80073CFA)

    Will look further into the blog & scripts this evening, thanks.


    Saturday, October 14, 2017 6:11 AM
  • This is how I do it;

    1. I install clean machine with install.wim.
    2. I run Get-AppPackages or whatever to list all the stuff.
    3. I compare the list to Remove script and remove the lines of apps I want to keep.
    4. I deploy the new computer using install.wim with this script.

    Have you compared the app names? Do you use install.wim or captured of your own?


    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!

    Saturday, October 14, 2017 11:29 AM
  • Hi, 

    I run the Win10 1703 through Deployment Workbench for a capture. Pretty straight forward procedure, mostly just inject the complete Windows update package of updates from launch of Win10 1703 up until the current month (downloaded from catalog.update.microsoft.com). To speed up SCCM task sequence instead of downloading all updates during OS deployment. This WIM-file is used in my SCCM task sequence where I also run my script to remove Win10 apps (see screenshot below).

    Hence comparing names: If you mean whether I have checked to make sure that package names are accurate (i.e. in RemoveApps.xml in Michael Niehaus' script) then yes I have. But I'm not sure if I'm missing something fundemental here, it would be great if someone can comment on this:

    Both scripts we have discussed (plus many others) are based on Remove-AppX & Remove-AppxProvisionedPackage -Online commands. Which I assume are the commands you also use in your Remove script. I keep getting the 0x80073CFA error on all remaining apps that my Remove script does not clean out. Which I guess is what happens when my Remove script tries to wipe them as well (see screenshots below).

    Edit: My script wipes with Remove-AppX <name> & Remove-AppX <fullpackagename>. Seemed like the 0x80073CFA while testing manual removal only appears when I use Remove-AppX <name>. Fullpackagename worked. Gonna try to add another restart in task sequence. The problem might simply be that the entire AppX list is not populated yet when script runs. Testing new OSD now, will report back later.

    SCCM task sequence

    Manual attempts to remove packages with Remove-AppX -Package on VM deployed from my SCCM task sequence:





    • Edited by ptbNO Monday, October 16, 2017 10:08 AM
    Monday, October 16, 2017 8:20 AM
  • I don´t see those apps you´re trying to remove, on the list....

    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!

    Monday, October 16, 2017 10:52 AM
  • It's in the "Remove Built-In Apps" I highlighted on screenshot from SCCM task sequence. Which runs the powershell script from this blog. Here's a new screenshot with details from the Remove Built-In Apps step

    Monday, October 16, 2017 11:07 AM
  • Ok, quite frankly not sure what happens. But here is a bit more detailed info I hope can help resolve this. The added restart in SCCM task sequence made no difference. Posting logfiles on external URLs to avoid spamming thread too much:

    Logfile from my Remove script in SCCM task sequence after OSD, which shows the script ran

    Get-AppXPackage after OSD. Not perfect but that all that bad. Some strange GUIDs, Cortana etc

    ...then in Windows suddenly more apps seems to install (even without a reboot)

    Another Get-AppxPackage is run after apps started appearing, showing a bit more items

    Ran my Remove script again manually in OS, here is log file

    Another Get-AppXpackage, after I ran Remove script manually

    Start menu, after I ran Remove script manually

    Start menu after rebooting client. Stuff like Sway, Network Test & Microsoft Power BI still appears with full icons on the tiles, but since they no longer are on the alphabetical menu I assume they are gone, and I can clean up + create custom XML. Still need to automate the full removal of apps and figure out why apps are re-apparing though. See previous post to see my SCCM task sequence & where the Remove script is being run


    • Edited by ptbNO Monday, October 16, 2017 5:28 PM
    Monday, October 16, 2017 5:13 PM
  • In OSD, use Remove-AppProvisionedPackages, instead of AppPackages.

    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!

    Tuesday, October 17, 2017 10:08 AM
  • My current script runs both:

    # 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

    # 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

    And my RemovedApps.log logfile shows both being run:

    Removing application package: Microsoft.BingWeather
    Removing application provisioning package: Microsoft.BingWeather_4.21.2212.0_neutral_~_8wekyb3d8bbwe
    Removing application package: Microsoft.DesktopAppInstaller
    Removing application provisioning package: Microsoft.DesktopAppInstaller_1.2.2002.0_neutral_~_8wekyb3d8bbwe

    Tuesday, October 17, 2017 10:26 AM
  • We could compare our scripts, and I could provide you the mine. Tell me, what apps you want to keep in image (specific names please)?

    Also, upload your script to OneDrive so I can download later. I will be at thurday next to my lab  and I can compare and maybe provide you something :)


    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!


    Tuesday, October 17, 2017 10:51 AM
  • Hi again yannara, much appreciate your time - and I would love to take a look at your script. I am running an unedited version of THIS SCRIPT (copy/paste) where only changes I've done is to whitelist WindowsCalculator, MSPaint, StorePurchaseApp, WindowsStore, MicrosoftEdge & Windows.Photos within the .ps1. 

    I'd maybe be even more interested in how you deploy during OSD, and specifically where in your task sequence. Because based on positive comments on the script I use and other threads on app removal topic it seems like something fundamental is wrong in my setup. I run the script above in my SCCM task sequence post application installation and post Windows updates (as you can see in the task sequence screenshot above). My WIM file in SCCM task sequence is from MDT and consists of Win10 1703 + Windows Updates up until September.

    Tuesday, October 17, 2017 11:31 AM
  • Your script is older, than the 1703 release, and as I wrote previously, those might be incompatible for newer builds. Why you don´t test the script I suggested? :)

    I try to remember this at thursday.


    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!

    Tuesday, October 17, 2017 12:36 PM
  • Take this, and delete the entries of apps you want to keep. Run this script at OSPhase, before updates;

    ## Configure the apps to be removed in Windows 10 1703 build.
    $AppsList = "Microsoft.3DBuilder",
                "Microsoft.BingWeather",
                "Microsoft.DesktopAppInstaller",
                "Microsoft.Getstarted",
                "Microsoft.Messaging",
                "Microsoft.Microsoft3DViewer",
                "Microsoft.MicrosoftOfficeHub",
                "Microsoft.MicrosoftSolitaireCollection",
                "Microsoft.MicrosoftStickyNotes",
                "Microsoft.MSPaint",
                "Microsoft.Office.OneNote",
                "Microsoft.OneConnect",
                "Microsoft.People",
                "Microsoft.SkypeApp",
                "Microsoft.StorePurchaseApp",
                "Microsoft.Wallet",
                "Microsoft.Windows.Photos",
                "Microsoft.WindowsAlarms",
                "Microsoft.WindowsCalculator",
                "Microsoft.WindowsCamera",
                "microsoft.windowscommunicationsapps",
                "Microsoft.WindowsFeedbackHub",
                "Microsoft.WindowsMaps",
                "Microsoft.WindowsSoundRecorder",
                "Microsoft.WindowsStore",
                "Microsoft.XboxApp",
                "Microsoft.XboxGameOverlay",
                "Microsoft.XboxIdentityProvider",
                "Microsoft.XboxSpeechToTextOverlay",
                "Microsoft.ZuneMusic",
                "Microsoft.ZuneVideo"
     
    ##Remove the Apps listed above or report if app not present
    ForEach ($App in $AppsList)
    {
        $ProPackageFullName = (Get-AppxProvisionedPackage -Online | Where {$_.Displayname -eq $App}).PackageName
     
        If ($ProPackageFullName) {
            Write-Host "Removing Provisioned Package: $ProPackageFullName"
            Remove-AppxProvisionedPackage -Online -PackageName $ProPackageFullName
        }
     
        Else {
            Write-Verbose "Unable To Find Provisioned Package: $App"
        }
    }
     
    ## End


    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!

    Tuesday, October 17, 2017 12:38 PM
  • Ok, so an update: 

    First I tried to run my original script in the MDT task sequence (see screenshot below) & generate a new WIM file. Then I used the new WIM file in my SCCM task sequence, along with running the original script once more in SCCM task sequence. Result: Looks fair enough upon startup but within 15 minutes after logging in a bunch of more apps are back. GetAppx-Provisioned -online only shows the 5 apps I whitelisted, but I'm still left with Photoshop, Alarms, Code Writer, Connect, DuoLingo, Eclipse Manager, External Desktop, Power BI, Mixed Reality Portal, Network Speed Test, News, Sway, Tips & Weather once the deployed computer has been online for a little while.

    Next I tried to replace my original script in SCCM task sequence with your scripts from https://gal.vin/2017/04/06/removing-uwp-apps-mdt/. I created one .ps1 for Current User + one .ps1 for provisioned apps (see screenshot below). As expected the result is the same as with my original script. All apps except 3 apps are gone upon startup, then more apps starts returning after a few minutes.

    Both scripts use Remove-Appx -Package XXX + Remove-AppxProvisioned -Online XXX. This is why I didn't bother try the gal.vin script right away. My original script goes online, gets an updated list of apps through Get-AppxPackage, then runs the script based on the output. So considering this I guess it doesn't matter if one script is a bit older. 

    Could all these returning apps be due to the Windows Cloud Content? Can I please see screenshots of your entire task sequence? 

    Running my original script in MDT task sequence:

    Running scripts from gal.vin in SCCM task sequence:


    • Edited by ptbNO Wednesday, October 18, 2017 9:53 AM
    Wednesday, October 18, 2017 9:51 AM
  • As mentioned before I really think something fundamental is wrong with my setup. All scripts I've tried seems to run and wipe apps, yet they re-appear. And it doesn't seem like others are having these issues on the various scripts for app removal. So if anyone have ideas I would much, much appreciate it. Need to deploy asap.

    And just for the record, below is a screenshot of the apps I listed for removal in gal.vin script:

    • Edited by ptbNO Wednesday, October 18, 2017 10:08 AM
    Wednesday, October 18, 2017 10:07 AM
  • How about you forbit your clients talk to MS directly? There are several GPO settings which needs to be configured. Telemetry will stay on minimum.

    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!

    Wednesday, October 18, 2017 12:49 PM
  • Maybe try this Reg Key to disable Store Updates when Building a Reference Image without the Apps:

    https://deploymentresearch.com/Research/Post/615/Fixing-why-Sysprep-fails-in-Windows-10-due-to-Windows-Store-updates

    Wednesday, October 18, 2017 1:22 PM
  • Hi, yeah I think you are both onto something. I am gonna try a few more agressive scripts and/or telemetry/disable store updates and report back. I still find it strange you guys don't battle the same problems I do though. But whatever works (without breaking basic features in OS) :)
    Wednesday, October 18, 2017 1:59 PM
  •  I still find it strange you guys don't battle the same problems I do though. 
    Yes, me too! If you paste your Facebook profile here, we could chat and we might find some solution maybe? 

    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!

    Wednesday, October 18, 2017 8:07 PM
  • ok, so I added a script to try to really lock things down in Registry, including things on Telemtry. It blocks a lot , but even with this script in SCCM task sequence they keep coming back :) @Michael-CM, I haven't tried adding the AutoDownload regkey yet cause from what I can tell the Store won't work afterwards, a feature I'd like to keep.

    Eventlog on the test VM I deployed to have Event 43s / WindowsUpdateClient per app that is reinstalled, so hopefully this can pinpoint more. I.e. "Installation Started: Windows has started installing the following update: 9WZDNCRD2G0J-Microsoft.Office.Sway"


    • Edited by ptbNO Thursday, October 19, 2017 7:00 AM
    Wednesday, October 18, 2017 8:29 PM
  •  "Installation Started: Windows has started installing the following update: 9WZDNCRD2G0J-Microsoft.Office.Sway"

    It seems that sway is not the app you can remove with PS. Perhaps you should use xml to clean up that startup menu as well. 

    I think, in 1703, the xbox stuff is something you can check on, are you doing things in a right way.


    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!


    Wednesday, October 18, 2017 8:39 PM
  •  "Installation Started: Windows has started installing the following update: 9WZDNCRD2G0J-Microsoft.Office.Sway"

    It seems that sway is not the app you can remove with PS. Perhaps you should use xml to clean up that startup menu as well. 

    I think, in 1703, the xbox stuff is something you can check on, are you doing things in a right way.


    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!


    MS will allow me to customize the tiles only through XML. Which, despite all the MS changes, still should be pretty straight forward. What I'm worried about is deploying Win10 to mostly computer novice users who are used to a Windows 7 start menu, with a start menu filled up with "Code Writer, Learn Languages" and a long list of other non-work-related stuff. It will for sure cause confusion and give a bad user experience. And unfortunately, whatever is installed cannot be hidden from start menu.
    Wednesday, October 18, 2017 8:52 PM
  • With XML, you customize start menu or screen, and this way you hide apps. Sure, with searching, user will get those things anyway. I´m starting to understand, what you are after, and I think you can´t cleanup the image _totally_ like you want. Previously we´ve been discussing different matters. Maybe you should take a look into LTSB direction then?

    Heavy customizations are not recommendend, you will see diffictulties with In-Place Upgrade later, if you tweak stuff too much.


    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!

    Wednesday, October 18, 2017 9:13 PM
  • With XML, you customize start menu or screen, and this way you hide apps. Sure, with searching, user will get those things anyway. I´m starting to understand, what you are after, and I think you can´t cleanup the image _totally_ like you want. Previously we´ve been discussing different matters. Maybe you should take a look into LTSB direction then?

    Heavy customizations are not recommendend, you will see diffictulties with In-Place Upgrade later, if you tweak stuff too much.


    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!

    If there is any chance I can create a custom start menu as well, I will for sure settle for that. I simply assumed there was no way to hide items on start menu since I am creating the XML based on a reference computer, and I cannot "unpin" items that are installed from the start menu.

    I obviously need to do some digging. You do have a valid point. I probably can't customize everything, and even if I do manage to do so who knows what MS will introduce on the next updates. Will do a bit more research on customizing start menu with XML. 

    Wednesday, October 18, 2017 9:41 PM

  • I am creating the XML based on a reference computer, and I cannot "unpin" items that are installed from the start menu.

    You can unpin icons from start screen (how ever you want to call it), which is first visible part for an end user. If he scrolls down the entire menu or use search, he will find that app you can´t get rid off.

    Please remember to mark my post as an answer, if I really helped you out, or vote if usefull. Thank you!

    Thursday, October 19, 2017 6:15 AM
  • Ok, I'm not sure how much further we will get here. I thank you so much for your patience yanarra, will accept the answers as is. Regarding XML customization: Then it is the way I thought. The tiles (on right side) can still be modified with XML. Which I will do. Due to my users migrating from Win7, and they've never even seen tiles, I wanted to keep the list in start menu on left side as short as possible. This is where they will try to locate their software. This is the main reason I've been hung up on uninstalling apps I cannot hide.

    Thanks again and I wish you a great weekend.

    Thursday, October 19, 2017 6:59 AM