Raphire / Win11Debloat

A simple, easy to use PowerShell script to remove pre-installed apps from Windows, disable telemetry, remove Bing from Windows search as well as perform various other changes to declutter and improve your Windows experience. This script works for both Windows 10 and Windows 11.
MIT License
11.28k stars 464 forks source link

Possible Issues with Powershell if installed from MS Store #93

Closed bdwakefield closed 6 days ago

bdwakefield commented 1 month ago

Describe the bug There are two things that I noticed while removing/uninstalling apps with this tool when PowerShell was installed from the MS Store. 1) Getting the list of installed apps from win-get takes a little longer than the 10s timeout (or some other issues occurs causing it to not return correctly thus getting the error message "unable to load list of installed apps".

2) Get-AppxProvisionedPackage -Online results in this error: Get-AppxProvisionedPackage: Class not registered from line 371

To Reproduce Execute the script and try to remove some apps using the dialog.

Additional context I don't think there is anything to "fix" on this one -- except maybe provide some info in the documentation? I don't think the script itself can fix this as it is most likely due to the way MS Store apps are sandboxed -- this behavior is seen elsewhere and is not specific to this script.

When I removed PowerShell and installed via WinGet directly; everything worked as expected.

winget install --id Microsoft.Powershell --source winget

Raphire commented 1 month ago

Heya!

This is an interesting one. I think your hypothesis that this is probably due to MS store sandboxing may be correct,

I'll do some playing around with this myself, perhaps the script can detect this somehow and display a warning to gracefully handle this situation.

Raphire commented 6 days ago

As we suspected it is indeed something related to the MS Store version of Powershell being sandboxed: https://github.com/PowerShell/PowerShell/issues/17232

I haven't been able to find a way to detect this issue. And I frankly don't think it's worth the time to continue looking, so I'm closing the issue.