Link to home
Start Free TrialLog in
Avatar of detox1978
detox1978Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Help with; DSGET Contact -memberof

Hi All,


I want to get a list of groups that our contacts are in?

I can't see the switch -memberof


Any help?
Avatar of MSE-dwells
MSE-dwells
Flag of Yemen image

Your question is a little ambiguous so I'll take a best guess at what you're after.  The command syntax below will return the DN of any group in which the Administrator is a member in the domain 'mset.lab' -

C:\>dsquery * domainroot -filter "&(objectcategory=group)(member=cn=administrator,cn=users,dc=mset,dc=lab)"
Hi!

Switch -memberof is available in command dsget user:
"dsget user "cn=Jon Smith,cn=users,dc=microsoft,dc=com" -memberof "

It would help if you post more details.

HTH

Toni
Avatar of detox1978

ASKER

Hi All,


I want to get a list of the groups that our contacts (thats AD contacts, used to forward email).

e.g.

my-email-forward is a contact with AD, i want to know what groups it's a member of.  I'm pretty sure you use DSGET CONTACT to get contact information....
Unfortunately, dsget contact does not support -memberof switch. Perhaps you should check ADFIND utilty from www. joeware.net, but at this point I'm not sure it will help.
i had a look at ADFIND, but got quickly confused.... any pointers?
ASKER CERTIFIED SOLUTION
Avatar of LauraEHunterMVP
LauraEHunterMVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try this:
adfind -b dc=domain,dc=com -f "&(objectcategory=person)(objectclass=contact)" memberof -nodn -nolabel -csv