ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    DISM /Remove-ProvisionedAppxpackage vs Remove-AppxPackage?

    IT Discussion
    powershell windows10
    3
    8
    3.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 1
      1337
      last edited by

      I'm trying to clean up some unneeded Windows 10 apps. But I'm not sure about what method to use.

      Does anyone know the difference between using:

      DISM /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsCamera_2018.826.98.0...
      

      versus using:

      Get-AppxPackage *camera* | Remove-AppxPackage
      
      ObsolesceO 1 Reply Last reply Reply Quote 0
      • ObsolesceO
        Obsolesce @1337
        last edited by

        @Pete-S said in DISM /Remove-ProvisionedAppxpackage vs Remove-AppxPackage?:

        I'm trying to clean up some unneeded Windows 10 apps. But I'm not sure about what method to use.

        Does anyone know the difference between using:

        DISM /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsCamera_2018.826.98.0...
        

        versus using:

        Get-AppxPackage *camera* | Remove-AppxPackage
        

        Dism is an exe, the other is a PowerShell cmdlet.

        I don't recall which one, but I think the verb-appxprovisionedpackage is more similar to dism?

        I don't remember anymore, it's been like 6 years now since I dove I to it when I wrote the Win10 crApp Remover.

        But here's the docs

        https://learn.microsoft.com/en-us/powershell/module/appx/remove-appxpackage?view=windowsserver2022-ps

        https://learn.microsoft.com/en-us/powershell/module/dism/remove-appxprovisionedpackage?view=windowsserver2022-ps

        1 1 Reply Last reply Reply Quote 2
        • 1
          1337 @Obsolesce
          last edited by

          @Obsolesce said in DISM /Remove-ProvisionedAppxpackage vs Remove-AppxPackage?:

          @Pete-S said in DISM /Remove-ProvisionedAppxpackage vs Remove-AppxPackage?:

          I'm trying to clean up some unneeded Windows 10 apps. But I'm not sure about what method to use.

          Does anyone know the difference between using:

          DISM /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsCamera_2018.826.98.0...
          

          versus using:

          Get-AppxPackage *camera* | Remove-AppxPackage
          

          Dism is an exe, the other is a PowerShell cmdlet.

          I don't recall which one, but I think the verb-appxprovisionedpackage is more similar to dism?

          I don't remember anymore, it's been like 6 years now since I dove I to it when I wrote the Win10 crApp Remover.

          But here's the docs

          https://learn.microsoft.com/en-us/powershell/module/appx/remove-appxpackage?view=windowsserver2022-ps

          https://learn.microsoft.com/en-us/powershell/module/dism/remove-appxprovisionedpackage?view=windowsserver2022-ps

          Awesome thanks!

          Links are great, it looks like there is all the information I need.

          I can see that you've put in an impressive amount of work making your Win10 crApp remover. I'll take a closer look at how you disable and uninstall things in your code.

          ObsolesceO 1 Reply Last reply Reply Quote 1
          • ObsolesceO
            Obsolesce @1337
            last edited by

            @Pete-S said in DISM /Remove-ProvisionedAppxpackage vs Remove-AppxPackage?:

            @Obsolesce said in DISM /Remove-ProvisionedAppxpackage vs Remove-AppxPackage?:

            @Pete-S said in DISM /Remove-ProvisionedAppxpackage vs Remove-AppxPackage?:

            I'm trying to clean up some unneeded Windows 10 apps. But I'm not sure about what method to use.

            Does anyone know the difference between using:

            DISM /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsCamera_2018.826.98.0...
            

            versus using:

            Get-AppxPackage *camera* | Remove-AppxPackage
            

            Dism is an exe, the other is a PowerShell cmdlet.

            I don't recall which one, but I think the verb-appxprovisionedpackage is more similar to dism?

            I don't remember anymore, it's been like 6 years now since I dove I to it when I wrote the Win10 crApp Remover.

            But here's the docs

            https://learn.microsoft.com/en-us/powershell/module/appx/remove-appxpackage?view=windowsserver2022-ps

            https://learn.microsoft.com/en-us/powershell/module/dism/remove-appxprovisionedpackage?view=windowsserver2022-ps

            Awesome thanks!

            Links are great, it looks like there is all the information I need.

            I can see that you've put in an impressive amount of work making your Win10 crApp remover. I'll take a closer look at how you disable and uninstall things in your code.

            To save you some time looking through that crAppy code, it basically comes down to two lines, 626 and 640.

            1 1 Reply Last reply Reply Quote 2
            • 1
              1337 @Obsolesce
              last edited by 1337

              @Obsolesce said in DISM /Remove-ProvisionedAppxpackage vs Remove-AppxPackage?:

              To save you some time looking through that crAppy code, it basically comes down to two lines, 626 and 640.

              I ended up doing something like this:

              # apps to remove
              $apps = 
                 '*549981C3F5F10_*',
                 '*GetHelp_*',
                 '*Getstarted_*',
                 '*Microsoft3DViewer_*',
                 '*MicrosoftOfficeHub_*',
                 '*MicrosoftSolitaireCollection_*',
                 '*MixedReality.Portal_*',
                 '*Office.OneNote_*',
                 '*People_*',
                 '*SkypeApp_*',
                 '*Wallet_*',
                 '*windowscommunicationsapps_*',
                 '*WindowsFeedbackHub_*',
                 '*WindowsMaps_*',
                 '*Xbox*',
                 '*YourPhone_*',
                 '*Zune*';
              
              foreach ($app in $apps) {
                 Get-AppxProvisionedPackage -Online | where {$_.PackageName -like $app} | Remove-AppxProvisionedPackage -Online 
                 Get-AppxPackage -Name $app | Remove-AppxPackage -AllUsers
              }
              

              Code needs to run as Administrator.
              Removes packages for new users as well as users already on the system.
              Windows shouldn't re-install them when you get updates.

              ObsolesceO 1 Reply Last reply Reply Quote 2
              • ObsolesceO
                Obsolesce @1337
                last edited by

                @Pete-S said in DISM /Remove-ProvisionedAppxpackage vs Remove-AppxPackage?:

                @Obsolesce said in DISM /Remove-ProvisionedAppxpackage vs Remove-AppxPackage?:

                To save you some time looking through that crAppy code, it basically comes down to two lines, 626 and 640.

                I ended up doing something like this:

                # apps to remove
                $apps = 
                   '*549981C3F5F10_*',
                   '*GetHelp_*',
                   '*Getstarted_*',
                   '*Microsoft3DViewer_*',
                   '*MicrosoftOfficeHub_*',
                   '*MicrosoftSolitaireCollection_*',
                   '*MixedReality.Portal_*',
                   '*Office.OneNote_*',
                   '*People_*',
                   '*SkypeApp_*',
                   '*Wallet_*',
                   '*windowscommunicationsapps_*',
                   '*WindowsFeedbackHub_*',
                   '*WindowsMaps_*',
                   '*Xbox*',
                   '*YourPhone_*',
                   '*Zune*';
                
                foreach ($app in $apps) {
                   Get-AppxProvisionedPackage -Online | where {$_.PackageName -like $app} | Remove-AppxProvisionedPackage -Online 
                   Get-AppxPackage -Name $app | Remove-AppxPackage -AllUsers
                }
                

                Code needs to run as Administrator.
                Removes packages for new users as well as users already on the system.
                Windows shouldn't re-install them when you get updates.

                Looks good.

                That said, if the devices are managed with MDM for example, it's typically best practice to Uninstall all that kind of apps for the user through a user assigned script or required app... instead of at the image or predeployment level.

                1 Reply Last reply Reply Quote 2
                • JaredBuschJ
                  JaredBusch
                  last edited by

                  @Pete-S using your little snippet did not clean up the pinned start menu of the initial admin user that ran it, nor the non admin user account that I subsequently created.

                  f2e6d053-0b72-4407-9ba8-b1d9dd3d75c8-image.png

                  It xbox was still in the start menu, but the rest looked gone.
                  da69b05a-32c4-40e7-ba6d-03ae78e2b092-image.png

                  1 1 Reply Last reply Reply Quote 0
                  • 1
                    1337 @JaredBusch
                    last edited by 1337

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post