Remove-AppxPackage for all users

12,236

You need to specify -AllUsers with Remove-AppxPackage. You also need to be in Windows 10 1809 or above for it to work. Below that version, "remove-appxpackage -allusers" may run without error and still not work. Confusingly, the allusers parameter to get-appxpackage has no effect on remove-appxpackage. This will only affect profiles that already exist. "Remove-AppxPackage -User" has never worked.

 Get-AppxPackage -allusers fitbit* | Remove-AppxPackage -allusers

Or

Remove-AppxPackage Fitbit.FitbitCoach_4.4.133.0_x64__6mqt6hf9g46tw -AllUsers
Share:
12,236
Docfxit
Author by

Docfxit

Updated on June 14, 2022

Comments

  • Docfxit
    Docfxit almost 2 years

    I would like to remove the Fitbit package from the Microsoft Store apps in Window 10. I have -allusers in the Powershell command but it's telling me Fitbit isn't in the current user. I don't care what user it's in. I would like to find out why it won't remove it from all users. I'm running this as Administrator with a user that has Administrator rights.

    PS C:\WINDOWS\system32> Get-AppxPackage -allusers fitbit | Remove-AppxPackage Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CF1, Package was not found. Windows cannot remove Fitbit.FitbitCoach_4.4.133.0_x64__6mqt6hf9g46tw because the current user does not have that package installed. Use Get-AppxPackage to see the list of packages installed. NOTE: For additional information, look for [ActivityId] 8a315047-822f-0000-d65f-318a2f82d501 in the Event Log or use the command line Get-AppPackageLog -ActivityID 8a315047-822f-0000-d65f-318a2f82d501 At line:1 char:38 + Get-AppxPackage -allusers fitbit | Remove-AppxPackage + ~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Fitbit.FitbitCo...__6mqt6hf9g46tw:String) [Remove-AppxPackage], PSInval idOperationException + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand

  • Docfxit
    Docfxit over 4 years
    Thank you, I ran it. I didn't get an error so I assume it ran. When I run sysprep I get an error saying: SYSPRP Package Fitbit.FitbitCoach_4.4.133.0_x64__6mqt6hf9g46tw was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
  • js2010
    js2010 over 4 years
    Sounds like it didn't work. Is it windows 10 1809 or above? You might have to login as that user and remove it.
  • Docfxit
    Docfxit over 4 years
    I have two users plus Administrator. I have logged in under all three and ran:
  • Docfxit
    Docfxit over 4 years
    I have two users plus Administrator. I have logged in under all three and ran: Get-AppxPackage -allusers Fitbit.FitbitCoach | Remove-AppxPackage -allusers and I also ran: Get-AppxProvisionedPackage -Online | where Displayname -EQ "Fitbit.FitbitCoach" | Remove-AppxProvisionedPackage -Online to remove the provision. Running in Windows 10 1903. I'm still getting the same error: SYSPRP Package Fitbit.FitbitCoach_4.4.133.0_x64__6mqt6hf9g46tw was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
  • js2010
    js2010 over 4 years
    It usually says in the PackageUserInformation property who has it installed.