“The trust relationship between this workstation and the primary domain failed.”

I have a Windows 10 VM on my laptop that I use for accessing the domain when I need to do administrative things. A recent logon attempt resulted in the error message “The trust relationship between this workstation and the primary domain failed.” being returned.

The quick fix was to log into the VM using a local user account (.\myusername) and then running the following powershell command in an elevated PS window:

Reset-ComputerMachinePassword -Credential domain\username -Server DC