[英]Remove-AppxPackage for all users
我想從 Window 10 中的 Microsoft Store 應用程序中刪除Fitbit
package。我有-allusers
在 Powershell 中告訴我當前用戶是 Fitbit 用戶。
我不在乎它在哪個用戶中。我想知道為什么它不會從所有用戶中刪除它。
我使用具有管理員權限的用戶以Administrator
身份運行它。
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
您需要使用 Remove-AppxPackage 指定 -AllUsers。 您還需要在Windows 10 1809 或更高版本才能工作。 在該版本以下,“remove-appxpackage -allusers”可能會正常運行,但仍然無法正常工作。 令人困惑的是,get-appxpackage 的 allusers 參數對 remove-appxpackage沒有影響。 這只會影響已經存在的配置文件。 “刪除-AppxPackage -User”從來沒有工作過。
Get-AppxPackage -allusers fitbit* | Remove-AppxPackage -allusers
或者
Remove-AppxPackage Fitbit.FitbitCoach_4.4.133.0_x64__6mqt6hf9g46tw -AllUsers
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.