IanN1990 Posted August 18, 2017 Posted August 18, 2017 (edited) Hi All, I am running into some issues trying to extract a list of users, their job titles and departments from a list of 47 CN Groups. Here is what i have have tried so fair. $var = _AD_GetObjectsInOU("", "(object=G-XD*)", 2) This gives me an array of the 47 CN names. For $I = 1 to ubound($var)-1 _Arraydisplay(_AD_GetGroupMembers($var[1])) Next This give me a list of users in each group but it seams _GetGroupMembers returns Common Name. Some Command Names are different from a users Account Name and this causes further extraction from _AD_GetObjectProperties() to fail. I tried using _AD_GetObjectsInOU() but cant get it work with CN. ;Idea 1 $SamName = _AD_SamAccountNameToFQDN("G-XD_VDI_Example") _AD_GetObjectsInOU(SamName, "", 2, "name,title,department") ;Idea 2 _AD_GetObjectsInOU("", "(&(memberof=cn=G-XD_VDI_Example)(name=*))", 2, "name,title,department") Does anyone have any ideas where to go from here? Edited August 18, 2017 by IanN1990
IanN1990 Posted August 18, 2017 Author Posted August 18, 2017 (edited) Closing. I was able to figure out the answer. I should of used the full path _AD_GetObjectsInOU("", "(&(memberof=CN=G-XD_VDI_Example,OU=Example,OU=Example,OU=Example,OU=WIN7,DC=office,DC=local)(name=*))", 2, "name,title,department") Edited August 18, 2017 by IanN1990
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now