When running the command "Get-Appxpackage -AllUsers" it errors on about 3% of the devices I deploy it to. So far this is around 30 in 900. It does not error if you do not have "-Allusers" parameter present. I have included the error below. I am aware of the normal fixes for trust relationship errors and I have tried the following:

  • Resetting the local machine password as suggested when you search how to fix trust relationship error
  • Running Test-ComputerSecureChannel comes back true.
  • Running nltest /sc_verify:EXAMPLEDOMAIN shows the trust is verified.
  • I have tried running "Get-Appxpackage -User 'example.user'" and it does not serve the function I need.
  • I have tried wsreset.exe

The error message is not the standard workstation to primary domain message. It is the primary domain to the trusted domain. As far as I am aware this is normally only on servers that have this but this is showing on workstations. Please see the highlighted differences below.

Get-Appxpackage -AllUsers Get-Appxpackage : The trust relationship between the primary domain and the trusted domain failed. (Exception from HRESULT: 0x800706FC) At line:1 char:1

  • Get-Appxpackage -AllUsers
  •  + CategoryInfo : NotSpecified: (:) [Get-AppxPackage], COMException + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.Windows.Appx.PackageManager.Commands.GetAppxPackageCommand 

If I remove and re-add the device to the domain it does fix the issue. However this is not practical. I would like to know what re-adding the device to domain is doing to fix this so that I can fix it remotely via script.

Related questions 2 Copy an object to new object with changed value 1 "Unspecified Error" when calling getElementById() 0 Powershell: How can I pass a variable as a parameter value? Related questions 2 Copy an object to new object with changed value 1 "Unspecified Error" when calling getElementById() 0 Powershell: How can I pass a variable as a parameter value? 394 Signtool error: No certificates were found that met all given criteria with a Windows Store App? 0 Passing filepath parameters to function 7 PowerShell 2.0 and how to handle exceptions? 2 Error while enabling IISNET45 95 Installing .appx without trusted certificate? 2 How to Insert Excel Formula using PowerShell? 1 Issues with Excel Find/Replace one string in multiple Excel Files Load 7 more related questions Show fewer related questions

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

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 and acknowledge that you have read and understand our privacy policy and code of conduct.