Repair computer that lost domain trust

A task the System Administrators have to deal with over and over is repairing a computer losing the trust relationship with Active Directory. Because of the ever increasing complexity of applications and settings, the traditional remove from domain , delete computer object form AD and join again is a terrible idea. Deleting the Computer object would delete all Bitlocker keys as well as wipe LAPS information associated with the device. A simple Powershell command will do the trick of restoring the trust: Test–ComputerSecureChannel –Repair