Greetings,
I have an AD group named "testgroupmemAccess" that is a nested group, meaning the members of the group are groups vs users. I wanted to get the cn and distinguished names of all the subgroups under the group. I tried below, but it is not working:
select cn, distinguishedName from openquery
(ADSI,
'SELECT cn, distinguishedName FROM ''LDAP://domain.tech.test/DC=dc1,DC=dc2,DC=dc3''
(&(objectCategory=''Person'')(sAMAccountName=''*'')(memberOf:1.2.840.113556.1.4.1941:=cn=''testgroupmemAccess'',
ou=users,DC=dc1,DC=dc2,DC=dc3))')