PowerShell Get-Appx -AllUsers fails with "The trust relationship between this workstation and the primary domain failed

I am trying to list all Appx packages on a domestic Win 10 laptop with Powershell (with a view to completely removing many of them to create space in C:\Program Files\WindowsApps) but when I try to list them from a Powershell Admin session I get the message

"The trust relationship between this workstation and the primary domain failed"

and no apps are listed.

5

1 Answer

It is possible that the Microsoft Store components are corrupted.

To reset the Microsoft Store, try these in order:

  • Run WSReset.exe

  • Run PowerShell as Administrator and enter the following command:

     Get-AppxPackage -AllUsers| Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like