Getting the error
"The trust relationship between this workstation and the primary domain failed."
Try …
Fix 1 - "The trust relationship between this workstation and the primary domain failed." – Workgroup/AD – Windows 10
https://support.microsoft.com/en-us/help/2771040/the-trust-relationship-between-this-workstation-and-the-primary-domain
Fix 2 - "The trust relationship between this workstation and the primary domain failed." – GPO – Windows Legacy
https://blogs.technet.microsoft.com/reference_point/2012/11/22/the-trust-relationship-between-this-workstation-and-the-primary-domain-failed/
Fix 3 - "The trust relationship between this workstation and the primary domain failed."
Test-ComputerSecureChannel -repair -credential domain\user
https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Management/Test-ComputerSecureChannel?view=powershell-4.0
Fix 4 - "The trust relationship between this workstation and the primary domain failed."
Reset-ComputerMachinePassword –server <DCname> -credential <DOMAIN\User>
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/reset-computermachinepassword?view=powershell-5.1
References
https://4sysops.com/archives/repair-the-domain-trust-relationship-with-test-computersecurechannel/