-
-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove-AppxPackage -AllUsers
error on Windows 10
#131
Comments
PS C:\WINDOWS\system32> Get-AppxPackage *Print3D* | Remove-AppxPackage -allusers
Remove-AppxPackage : Échec de l’appel de procédure distante.
Échec de l’appel de procédure distante.
Au caractère Ligne:1 : 29
+ Get-AppxPackage *Print3D* | Remove-AppxPackage -allusers
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Remove-AppxPackage], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.Windows.Appx.PackageManager.Comman
ds.RemoveAppxPackageCommand |
Heya, This looks similar to the issue that people encountered a while ago #74. It seems to stem from some kind of bug in Remove-AppxPackage that doesn't exist in Windows 11. I did implement a work-around specifically for Windows 10 that seemed to do the job, but maybe something changed? I'll see if I can reproduce this issue myself and report back. |
There are two more data I can give you: |
I found an Windows 10 22H2 with build |
Thanks again for the additional info, I have some trouble updating my w10 vm's, once I get them up to date I'll test and look for a solution. |
@GuillaumeHullin After updating my VM's I am now on |
I only have access right now to one Win10 but I don't have update available and I'm still at |
It seems to be a relatively new release, maybe it's a gradual roll-out. https://support.microsoft.com/en-us/topic/september-24-2024-kb5043131-os-build-19045-4957-preview-2d4a5c54-ac58-4bdb-8685-57d578650e5f |
Back on that problem, I got some Windows 10 with the build |
I have been able to reproduce it now on The only workaround that I have found to work is removing the -AllUsers flag from the command. This does however mean the script only uninstalls app for the current user. |
But the weird thing is that I have other Windows 10 updated to the same build, and I have no issue running the script. I was thinking maybe comparing some DLLs or other related files that could indicate a difference between the systems but so far I couldn't find anything. |
Do those machines have multiple users? |
All of them. At least 2 admin accounts and one users. |
Interesting, thanks for sharing these observations. Are all these machines on Windows 10? |
Yes, all Windows 10. On Windows 11 machines, it works fine. |
Just to confirm: Are all Windows 10 machines affected, or do some Windows 10 machines work ok? From what I can tell so far it seems to be related to Windows 10. |
Some Windows 10 machines works okay. I would say 50/50. |
Additionally added a workaround for the issue described in #131, to ensure the app is atleast uninstalled for the current user while we figure out how to fix app removal for all users.
@GuillaumeHullin Very weird indeed. I haven't found any solution for the issue so far, I'll update this thread when I do. I did find out that app removal only seems bugged when using the -AllUsers switch. So I pushed an update that includes a sort of workaround to ensure the apps are atleast uninstalled for the current user. |
Some log from my Windows 10 problems.
|
Yes, I did see that too. Does your script log when uninstalling without the AllUsers switch? |
It does log an error if the uninstall fails for the current user. Looking at the output you shared the uninstall did work for the current user. |
Where do you see that it did work for the current user 😅 ? |
If removal fails for the current user it would show Admittedly though the current implementation isn't the clearest. |
Oh okay. Good to know. |
The last upgrade of november 2024 KB5046613 (build 19045.5198) fixes the problem |
That's good to hear, I'll see if I can test this version soon. |
Issue seems to indeed be fixed on W10 since build 19045.5198 as noted by @carter1024, so I'll close the issue. |
Most of the Windows 10 (around 5-6 this week) I tried to run the debloat script failed to uninstall apps with the following error:
I tried Microsoft updates, sfc, reset Microsoft Store, etc... no luck. Anybody?
The text was updated successfully, but these errors were encountered: