Alternative to AD inspector for retrieving distinguished name

Has anyone used the registry to evaluate a machine’s distinguished name instead of the active directory inspector? I’m curious if this would have a positive effect on client evaluation times and also if anyone is aware of any downsides to this. Below is the expression I’m using to retrieve the distinguished name. It seems to work on my test machine as quickly as reading a line out of a file.

distinguished name ((it as string) of (value “Distinguished-Name” of it) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine” of native registry)