2

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
vinalti
  • 966
  • 5
  • 26
Docfxit
  • 137
  • 3
  • 6
  • 15

1 Answers1

4

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
js2010
  • 23,033
  • 6
  • 64
  • 66
  • 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. – Docfxit Oct 14 '19 at 03:46
  • Sounds like it didn't work. Is it windows 10 1809 or above? You might have to login as that user and remove it. – js2010 Oct 14 '19 at 12:15
  • I have two users plus Administrator. I have logged in under all three and ran: – Docfxit Oct 14 '19 at 15:45
  • 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. – Docfxit Oct 14 '19 at 15:52
  • It usually says in the PackageUserInformation property who has it installed. – js2010 Oct 14 '19 at 16:02
  • Sorry to dig this off, but that can help someone maybe : For me, `Get-AppxPackage -AllUsers *Feedback* | Remove-AppxPackage -AllUsers` gives me an unauthorized error but `Get-AppxPackage -AllUser *Feedback* | Remove-AppxPackage -AllUser` works fine. App is removed. Notice the difference between `-AllUsers`/`-AllUser` – vinalti Jul 13 '22 at 12:03
  • @vinalti It's just a unique abbreviation of the same parameter. – js2010 Jul 13 '22 at 14:25
  • Yeah, so I noticed that actually when run the first time i have an error, and when run a second time I have no error anymore. I published a script to uninstall preinstalled applications from Windows devices. [Fint it on Github, here](https://github.com/Vinalti/Windows-Remove-Preinstalled-Apps) Recently made a PR for removing packages to `-AllUsers` – vinalti Jul 13 '22 at 15:15