Win Server: locked out after installing AD / Domain

I always avoided AD. A month ago I decided to test install it on a test WinServer 2022.

account / pw / domain: AdmAcc / pw / TK

Coming back to it after a few weeks I was locked out. it displayed TK/AdmAcc instead of the normal “AdmAcc” and told me “The security database on the server does not have a computer account“.

Research and multiple attempts to fix this, or log in on the local account as WINSERVER2022AdmAcc, or to try to “repair the Domain Trust Relationship Between Workstation and Active Directory” all failed and I gave up.

Now I have to install WinServer 2025 on the same system, replacing the 2022, preferably with Domain and AD.

How do I avoid to make the same mistake?