![]() |
![]() |
|
|||||||
| Register | Forum Rules | Getting Started! - Guide | Blog | Videos | Gallery | Members List | Social Groups | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
dsquery filter
Hello!
I have the following question: I want to use dsquery to get all users in a specified OU who are members of an given group. I try it so: dsquery * "OU=OU1,OU=Accounts,DC=domain,DC=local" -attr name memberOf -filter "(memberOf=*ocsgrp*)" The result set is always empty. I expect 3 users. Whats wrong? Many thanks!! |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Re: dsquery filter
Björn wrote:
> I have the following question: > > I want to use dsquery to get all users in a specified OU who are members > of an given group. > > I try it so: > > dsquery * "OU=OU1,OU=Accounts,DC=domain,DC=local" -attr name > memberOf -filter "(memberOf=*ocsgrp*)" > > The result set is always empty. I expect 3 users. > > Whats wrong? You must specify the full Distinguished Name of the group in the filter clause. Wildcards don't work. Something like: -filter (memberOf=cn=ocsgrp,OU=OU1,OU=Accounts,DC=domain,D C=local) -- Richard Mueller Microsoft MVP Scripting and ADSI Hilltop Lab - http://www.rlmueller.net -- |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
< Home - Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |