I am looking for a way to retrieve a computers Active Directory container from the registry stored on that same machine. Is there any registry key in Windows that would contain the full LDAP path for the computer object?
Ex. Computers\MyDomain.local
It should be located in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine, string value called "Distinguished-Name"
I think this will be the location as of the last successful group policy refresh.