none
Powershell script to remove apps doesn't work for all users

    Question

  • Hey can someone tell me this.

    I run this script on my workstation:

     Get-AppxPackage -allusers *officehub* | Remove-AppxPackage

    it removes it for the current user, but when I log in as a new user, it is still there.  Thoughts?

    Friday, February 19, 2016 2:03 PM

Answers

  • Try the following removing or adding any apps you wish to use. Remember to run PowerShell with Admin rights

    $AppList = "Microsoft.SkypeApp",          
               "Microsoft.ZuneMusic",
               "Microsoft.ZuneVideo",
               "Microsoft.Office.OneNote",
               "Microsoft.BingFinance",
               "Microsoft.BingNews",
               "Microsoft.BingWeather",
               "Microsoft.BingSports",
               "Microsoft.XboxApp",
               "Microsoft.MicrosoftOfficeHub"
    ForEach ($App in $AppList)
     {
     $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"
     }
     }

    Monday, February 22, 2016 2:21 PM

All replies

  • You did not removed the provisioned package.

    After Remove-AppxPackage, you need also to use Remove-ProvisionedAppxPackage

    Gerald

    Friday, February 19, 2016 2:36 PM
  • Nice, I need to try this. I too was puzzled by this sneaky trick that Microsoft was doing. Does it work for OneDrive which my people consider to be malware?
    Friday, February 19, 2016 2:41 PM
  • No, Onedrive is not a Modern Application and can't be removed in an ordinary way.

    But you can block it with Group Policies.

    Gerald



    Friday, February 19, 2016 2:47 PM
  • This link will help with the OneDrive hiding/removal

    https://techjourney.net/disable-or-uninstall-onedrive-completely-in-windows-10/

    I put the uninstall commands into a script that we can ether push to a client or run in a task sequence.  

    Friday, February 19, 2016 2:56 PM
  • Didnt work I tried both

    Get-AppxPackage -allusers *officehub* | Remove-AppxPackage | Remove-ProvisionedAppxPackage

    Get-AppxPackage -allusers *officehub* | Remove-ProvisionedAppxPackage

    Friday, February 19, 2016 3:05 PM
  • Wrong method...

    After removing the appx for all users, the command is:

    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.MicrosoftOfficeHub_2015.6628.23511.0_neutral_~_8wekyb3d8bbwe

    If you need to check the Package Name, use:

    Get-AppxProvisionedPackages -Online 

    Then after Microsoft.OfficeHub for the package name:


    Friday, February 19, 2016 3:18 PM
  • This didn't work either.. This time it put it in  the info from the full package name:

    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.MicrosoftOfficeHub_17.4218.23751.0_
    x64__8wekyb3d8bbwe

    Said system cannot find file specified. 

    Friday, February 19, 2016 4:01 PM
  • Just tested on another computer and this is the right PowerShell command to remove a provisioned package:

    Something seems wrong with your package or with your command.
    Are you sure about the package name? All my computers seems to have a different version of OfficeHub :-s

    Saturday, February 20, 2016 11:02 AM
  • Hi,

    Please try command here: add -alluser parameter:

    Get-appxpackage -allusers | where-object {$_.packagename -like "*OfficeHub*"} | remove-appxpackage


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

    Monday, February 22, 2016 9:25 AM
    Moderator
  • that did not work either.

    Monday, February 22, 2016 1:33 PM
  • Try the following removing or adding any apps you wish to use. Remember to run PowerShell with Admin rights

    $AppList = "Microsoft.SkypeApp",          
               "Microsoft.ZuneMusic",
               "Microsoft.ZuneVideo",
               "Microsoft.Office.OneNote",
               "Microsoft.BingFinance",
               "Microsoft.BingNews",
               "Microsoft.BingWeather",
               "Microsoft.BingSports",
               "Microsoft.XboxApp",
               "Microsoft.MicrosoftOfficeHub"
    ForEach ($App in $AppList)
     {
     $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"
     }
     }

    Monday, February 22, 2016 2:21 PM
  • This seemed to work, but system did updates and apps are back.

    Monday, March 21, 2016 8:34 PM
  • Hi, 

    Please know that the System upgrade would do this, since it will contain all feature upgrade and components updates. 


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

    Thursday, March 24, 2016 6:40 AM
    Moderator
  • Kate Li, very lame, but I know it is not your fault. 

     
    Thursday, March 24, 2016 6:23 PM
  • When running this from System Account ("NT INSTANS\System") it dose'nt seem to work.

    It remove only from System account and not other accounts on the computer.

    Unable to find package: Microsoft.3Dbuilder
    Unable to find provisioned package: Microsoft.3Dbuilder

    Microsoft.ZuneMusic_2019.16092.10311.0_neutral_~_8wekyb3d8bbwe
    Unable to find package: Microsoft.ZuneMusic
    Removing Provisioned Package: Microsoft.ZuneMusic_2019.16092.10311.0_neutral_~_8wekyb3d8bbwe


    Path          :
    Online        : True
    RestartNeeded : False

    3DBuilder is still there on Users Start.

    Thursday, November 24, 2016 7:53 PM
  • Facing the same issue unfortunately.

    Earlier I have used Jorgen Nilssons script with great success, but in the 1607 release this unfortunately do not do the job any longer.

    Link to article: http://ccmexec.com/2015/08/removing-built-in-apps-from-windows-10-using-powershell/

    Have tried it in a separate tasksequence, during the capture process of the image etc. but despite the effort the bloatware returns when a new user logs in.

    I can in test afterwards remove it when the user is local administrator but none of our users are and they are therefore getting an Access Denied and the package remain.

    Have used both Get-AppxPackage and Get-AppxProvisionedPackage -online and the result is the same.

    Has anyone found a successful workaround for this ?

    Wednesday, November 30, 2016 10:54 AM
  • Has anyone found a successful workaround for this ?

    Yes, Kind of for now.  After failing four Security Audits thanks to Windows 10 LTSB, which has much of this disabled except for OneDrive and a few telemetry still running.  What we did and what you can do to apply this to the other apps in windows 10 is the following:

    First run this Standard Kill of One Drive: 

    ====

              set x86="%SYSTEMROOT%\System32\OneDriveSetup.exe"
              set x64="%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe"
              echo Closing OneDrive process.
              echo.
              taskkill /f /im OneDrive.exe > NUL 2>&1
              ping 127.0.0.1 -n 5 > NUL 2>&1

              echo Uninstalling OneDrive.
              echo.
              if exist %x64% (
              %x64% /uninstall
              ) else (
              %x86% /uninstall
              )
              ping 127.0.0.1 -n 5 > NUL 2>&1

              echo Removing OneDrive leftovers.
              echo.
              rd "%USERPROFILE%\OneDrive" /Q /S > NUL 2>&1
              rd "C:\OneDriveTemp" /Q /S > NUL 2>&1
              rd "%LOCALAPPDATA%\Microsoft\OneDrive" /Q /S > NUL 2>&1
              rd "%PROGRAMDATA%\Microsoft OneDrive" /Q /S > NUL 2>&1
              echo Removeing OneDrive from the Explorer Side Panel.
              echo
              REG DELETE "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1
              REG DELETE "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1
              pause

    ===================

    Second, This is what we came up with, and it is the most important!!!

    We located the OneDriveSetup file and took ownership of the setup file.  Then we deleted the file, and then we replaced the file with one of our own files.  Which we changed the ownership and permissions on it so that Microsoft cannot update it or run it. 

    We use the following.  You may need to run this one or two times to get it to the make the file inert. For some reason it does not always work the first time.  Probably file is in use somehow.

    ===========================

              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 RUN AGAIN

              Pause

    =============================

    It is important to notice the File Size when done at last pause. File size should be "0" .

    What this does is prevent the system and the installer from being able to read/write to the file.  Of course giving you this information to you will probably make Microsoft very their method of installing this app.  but it works for now.

    So find the Setup file of each app you want to kill.  Take ownership of it. Delete it, replace it with a file with same name. Then deny access to the file so the System SIDs above cannot use the file.




    • Edited by -MW Wednesday, November 30, 2016 3:01 PM
    Wednesday, November 30, 2016 2:40 PM
  • Thanks for the input. Seems like a long road going through those steps for each app as there is a good handful of apps :-(

    Noticed that I can remove the app once it has been installed and appear in the WindowsApp folder if the user is admnistrator. However ours are not. Can also see the app is being registred in the folder: C:\Users\"UserName"\AppData\Local\Packages once installed, but it cannot be removed with powershell without getting an Access Denied.

    Have no idea how to get around this one with build 1607. So very frustrating that Microsoft is making it so hard to get the crapware removed from the system.

    Friday, December 02, 2016 12:58 PM
  • You need to run the powershell as Administrator.

     

    Friday, December 02, 2016 2:54 PM
  • Hi,

    Using the -allusers option, I am able to list the packages, but not able to remove the packages installed for other users.

    Any other option to be added?. 


    • Edited by joice123 Thursday, May 25, 2017 12:57 AM
    Thursday, May 25, 2017 12:57 AM
  • See the script that has been marked as the answer. You need to use Get-AppxProvisionedPackage as well as Get-AppxPackage and you must run PowerShell with elevated rights.
    Thursday, May 25, 2017 6:15 AM
  • I cannot get any of these scripts to work properly in 1703. During our deployment task it runs but does not do anything. Once logged in for the first time the best I can get is the provisioned apps removed but their tiles are still on the start menu. 

    Also cannot get setting default apps for file types xml to apply

    Cannot get start menu layout to load by applying a new bin file.

    Cannot get Consumer Experience to turn off via reg entry during a task sequence. 

    Windows 10 is not the most deployment friendly OS. It also now talks to me at the end of the deployment when it connects to a network.

    Thursday, May 25, 2017 7:44 PM
  • Spend way to much time to get this solved, but I found out that Windows 10 Pro and the enterprise version handles this differently.

    In my setup we use the Pro version, and in order to be able to remove it for all users I have to make some registry changes otherwise the apps will return/ reinstall eventually for new users when they log in. There are some minor articles when I googled this, but found the following registry changes to work, before I removed the apps using the Get-AppxPackage/ Remove-AppxPackage.

    Simply made a script to run before removing the apps, and that cleared it for me.

    reg load "hku\Default" "C:\Users\Default\NTUSER.DAT"

    reg add "HKU\Default\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d "0" /f
    reg add "HKU\Default\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d "0" /f
    reg add "HKU\Default\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OemPreInstalledAppsEnabled" /t REG_DWORD /d "0" /f
    reg add "HKU\Default\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d "0" /f

    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "ContentDeliveryAllowed" /t REG_DWORD /d "0" /f
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d "0" /f
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d "0" /f
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OemPreInstalledAppsEnabled" /t REG_DWORD /d "0" /f
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d "0" /f
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEverEnabled" /t REG_DWORD /d "0" /f

    reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager\SuggestedApps" /f
    reg delete HKU\default\software\Microsoft\Windows\CurrentVersion\Run /v OneDriveSetup /f

    reg unload "hku\Default"

    Monday, May 29, 2017 9:13 AM
  • I tried the above step on Enterprise and it does not work.. Though the commands works without issues...The script i am using works perfectly in removing apps for the current user but when new user logs in, all the Apps pops up.. Can someone please guide me through to the correct way or any other steps that might be useful in resolving this issue?
    Thursday, August 17, 2017 1:57 PM
  • As of v1709 (Fall Creator's Update), there is a new "-AllUsers" flag for Remove-AppxPackage

    Wednesday, October 18, 2017 4:02 AM
  • As of v1709 (Fall Creator's Update), there is a new "-AllUsers" flag for Remove-AppxPackage

    Sounds useful. Can you point me to the documentation please?
    Wednesday, October 18, 2017 6:40 AM
  • Doesn't work

    We have 1709 and trying to get rid of the apps.  Like most people have said, when logging in as a new user they all come back.

    The guys in IT are starting to hate Windows 10 and rightly so.  It's been nothing but trouble for us.  Everything takes hours and hours to sort.

    Wednesday, November 22, 2017 3:19 PM
  • the apps installing for a new user is a typical problem with provisioned packages, when only "Remove-AppxPackage" was used.
    One needs to use "Remove-AppxProvisionedPackage", too.

    Wednesday, November 22, 2017 4:46 PM
  • the apps installing for a new user is a typical problem with provisioned packages, when only "Remove-AppxPackage" was used.
    One needs to use "Remove-AppxProvisionedPackage", too.

    Like I said earlier, it doesn't work.  New users get the apps back again.
    Thursday, November 23, 2017 8:48 AM
  • You say you have 1709. Is this a fresh install or an upgrade from a previous version. We've noticed Apps reappearing with the Upgrade process and have had to re-run our script post-upgrade to get rid of them again.
    Thursday, November 23, 2017 8:52 AM
  • This is what we have tried, but all apps come back for new users

    Get-AppxPackage -allusers *communicationsapps* | Remove-AppxPackage
    Get-AppxPackage -allusers *alarms* | Remove-AppxPackage
    Get-AppxPackage -allusers *photos* | Remove-AppxPackage

    Get-AppxPackage -allusers *phone* | Remove-AppxPackage
    Get-AppxPackage -allusers *messaging* | Remove-AppxPackage
    Get-AppxPackage -allusers *soundrecorder* | Remove-AppxPackage

    Get-AppxPackage -allusers *getstarted* | Remove-AppxPackage
    Get-AppxPackage -allusers *gethelp* | Remove-AppxPackage
    Get-AppxPackage -allusers *feedback* | Remove-AppxPackage

    Get-AppxPackage -allusers *mspaint* | Remove-AppxPackage
    Get-AppxPackage -allusers *solitaire* | Remove-AppxPackage
    Get-AppxPackage -allusers *3d* | Remove-AppxPackage
    Get-AppxPackage -allusers *bing* | Remove-AppxPackage
    Get-AppxPackage -allusers *zune* | Remove-AppxPackage
    Get-AppxPackage -allusers *xboxapp* | Remove-AppxPackage

    Get-AppxPackage -allusers *officehub* | Remove-AppxPackage
    Get-AppxPackage -allusers *onenote* | Remove-AppxPackage
    Get-AppxPackage -allusers *skypeapp* | Remove-AppxPackage
    Get-AppxPackage -allusers *sway* | Remove-AppxPackage

    Get-AppxPackage -allusers *remotedesktop* | Remove-AppxPackage
    Get-AppxPackage -allusers *oneconnect* | Remove-AppxPackage
    Get-AppxPackage -allusers *wallet* | Remove-AppxPackage

    Get-AppxPackage -allusers *duolingo* | Remove-AppxPackage
    Get-AppxPackage -allusers *powerbi* | Remove-AppxPackage
    Get-AppxPackage -allusers *speedtest* | Remove-AppxPackage
    Get-AppxPackage -allusers *eclipse* | Remove-AppxPackage
    Get-AppxPackage -allusers *actipro* | Remove-AppxPackage

    Remove-AppxProvisionedPackage -Online -PackageName microsoft.windowscommunicationsapps_17.8700.40645.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.WindowsAlarms_10.1709.2621.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.Windows.Photos_2017.39091.16340.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.Messaging_3.32.15001.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.WindowsSoundRecorder_10.1709.2703.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.Getstarted_5.12.2691.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.GetHelp_10.1706.1811.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.WindowsFeedbackHub_1.1708.2831.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.MicrosoftSolitaireCollection_3.18.10182.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.Microsoft3DViewer_2.1709.8012.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.Print3D_1.0.2422.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.3DBuilder_15.0.2911.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.BingWeather_4.21.2492.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.ZuneMusic_10.17084.21621.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.ZuneVideo_10.17092.13511.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.XboxApp_34.35.13001.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.MicrosoftOfficeHub_17.8414.5925.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.Office.OneNote_17.8625.21151.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.SkypeApp_12.8.487.0_x64__kzf8qxf38zg5c
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.OneConnect_3.1708.2224.0_x64__8wekyb3d8bbwe
    Remove-AppxProvisionedPackage -Online -PackageName Microsoft.Wallet_1.0.16328.0_x64__8wekyb3d8bbwe

    we've also looked at doing this....

    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.3DBuilder_15.0.2911.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.BingWeather_4.21.2492.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.GetHelp_10.1706.1811.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Getstarted_5.12.2691.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Messaging_2017.815.2052.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Microsoft3DViewer_2.1709.8012.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.MicrosoftOfficeHub_2017.715.118.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.MicrosoftSolitaireCollection_3.18.10182.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.MSPaint_3.1710.30027.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Office.OneNote_2015.8625.21151.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.OneConnect_3.1708.2224.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.People_2017.1006.1846.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Print3D_1.0.2422.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.SkypeApp_12.8.487.0_neutral_~_kzf8qxf38zg5c
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Wallet_1.0.16328.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Windows.Photos_2017.39091.16340.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsAlarms_2017.920.157.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:microsoft.windowscommunicationsapps_2015.8700.40645.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsFeedbackHub_2017.1010.2056.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsSoundRecorder_2017.928.5.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Xbox.TCUI_1.8.24001.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.XboxGameOverlay_1.22.30001.0_neutral_~_8wekyb3d8bbwe
    DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.XboxIdentityProvider_2017.605.1240.0_neutral_~_8wekyb3d8bbwe

    but that doesn't work either


    • Edited by GlenHarrison Thursday, November 23, 2017 9:10 AM
    Thursday, November 23, 2017 9:01 AM
  • ok, so I've done a bit of digging around and these commands do work.  However, new apps are still coming through.  New user logged in, and got a mickey mouse game on their start menu.  This is not enterprise ready!

    Get-AppxPackage -allusers *communicationsapps* | Remove-AppxPackage
    Get-AppxPackage -allusers *alarms* | Remove-AppxPackage
    Get-AppxPackage -allusers *photos* | Remove-AppxPackage

    Get-AppxPackage -allusers *phone* | Remove-AppxPackage
    Get-AppxPackage -allusers *messaging* | Remove-AppxPackage
    Get-AppxPackage -allusers *soundrecorder* | Remove-AppxPackage

    Get-AppxPackage -allusers *getstarted* | Remove-AppxPackage
    Get-AppxPackage -allusers *gethelp* | Remove-AppxPackage
    Get-AppxPackage -allusers *feedback* | Remove-AppxPackage

    Get-AppxPackage -allusers *mspaint* | Remove-AppxPackage
    Get-AppxPackage -allusers *solitaire* | Remove-AppxPackage
    Get-AppxPackage -allusers *3d* | Remove-AppxPackage
    Get-AppxPackage -allusers *bing* | Remove-AppxPackage
    Get-AppxPackage -allusers *zune* | Remove-AppxPackage
    Get-AppxPackage -allusers *xboxapp* | Remove-AppxPackage

    Get-AppxPackage -allusers *officehub* | Remove-AppxPackage
    Get-AppxPackage -allusers *onenote* | Remove-AppxPackage
    Get-AppxPackage -allusers *skypeapp* | Remove-AppxPackage
    Get-AppxPackage -allusers *sway* | Remove-AppxPackage

    Get-AppxPackage -allusers *remotedesktop* | Remove-AppxPackage
    Get-AppxPackage -allusers *oneconnect* | Remove-AppxPackage
    Get-AppxPackage -allusers *wallet* | Remove-AppxPackage

    Get-AppxPackage -allusers *duolingo* | Remove-AppxPackage
    Get-AppxPackage -allusers *powerbi* | Remove-AppxPackage
    Get-AppxPackage -allusers *speedtest* | Remove-AppxPackage
    Get-AppxPackage -allusers *eclipse* | Remove-AppxPackage
    Get-AppxPackage -allusers *actipro* | Remove-AppxPackage

    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*communicationsapps*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*alarms*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*photos*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*messaging*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*soundrecorder*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*getstarted*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*gethelp*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*feedback*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*solitaire*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*3d*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*bing*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*zune*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*xboxapp*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*officehub*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*onenote*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*skype*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*oneconnect*"} | Remove-AppxProvisionedPackage –Online
    Get-AppxProvisionedPackage –Online | where-object {$_.packagename –like "*wallet*"} | Remove-AppxProvisionedPackage –Online

    Thursday, November 23, 2017 9:56 AM
  • with the above commands and this in the registry (set via gpo) I think we're good

    Hive HKEY_CURRENT_USER
    Key path SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager
    Value name SilentInstalledAppsEnabled
    Value type REG_DWORD
    Value data 0x0 (0)

    Thursday, November 23, 2017 10:11 AM
  • Glad you found a solution. Are you using Enterprise or Pro?
    Thursday, November 23, 2017 10:13 AM
  • Glad you found a solution. Are you using Enterprise or Pro?
    well that's another issue here.  We are using Enterprise but we had a large batch of surface pros arrive and we have decided due to various reasons to keep them with the pre installed os which is pro.  I think next year they will all be reimaged to enterprise though
    Thursday, November 23, 2017 11:05 AM
  • That's interesting. I just did a 1709 build and my script is working without registry editing. However I can see from @Jarvis_kk post above that he had to do the registry fix for Pro.
    Thursday, November 23, 2017 11:13 AM