I've got a function that gets a list of all the users in a specified Active Directory group via an LDAP query. Part of the query string is the domain components. For example, if my domain is Test.com, then the part of the query string in question would be
- "<LDAP://DC=Test,DC=com>"
I would like to automate this so that I don't have to hard code these components. I have found an API that gets the "Test" portion (
link), but I can't find anything for the ".com" portion.