in Windows, and maybe in system logs, is there a way to find if a computer have been in an Active Directory domain, even if now it is not.
Does a log message trace join or quit a domain ?
Yes, there is a log for joining a domain.
eventvwr.msc > Windows Logs > System. Filter Current Log by event ID 3260.
Also, when you quit a domain it means you joined a workgroup and the event ID you should filter in this case is 3261.