Announcement

Collapse
No announcement yet.

dsquery help

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • dsquery help

    Hi,

    I would like to query the list of user objects which are not part of one security group in my domain. Is it possible to do it with dsquery command?

    Thanks,
    Sitaram

  • #2
    Re: dsquery help

    Originally posted by charlsteve View Post
    Is it possible to do it with dsquery command?
    The answer is Yes but.

    With dsquery.exe use the -filter switch to be able to define your own ldap query filter:
    http://www.petri.com/ldap_search_sam...d_exchange.htm <-- where the "!" means "NOT":
    Code:
    dsquery.exe * -limit 0 -filter "(&(objectCategory=person)(ObjectClass=user)(!memberof=cn=groupname,ou=my groups,ou=myOU,dc=domain,dc=local))" -attr name
    but..
    dsquery does not check for the members of nested groups!

    \Rems

    This posting is provided "AS IS" with no warranties, and confers no rights.

    __________________

    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts

    Comment

    Working...
    X