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

Solution 1:

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"}