dsquery to dsget


i'm trying write query output list of users member of particular ou , particular security group.

i know gives me users:

dsquery user ",ou=user accounts,dc=corp,dc=com" -inactive 43 -limit 10000 > query.txt

and know this gives members of group:

dsget group "cn=app_doc,,ou=application,ou=groups,dc=corp,,dc=com" -members > c:\query.txt

 

what need them pipe 1 result next , output users match both.  appreciated

one issue can't filter on ous in ldap query.

what tool adfind  

http://www.joeware.net/freetools/tools/adfind/index.htm

adfind -b "dn of ou here"  -f "&(objectcategory=person)(objectclass=user)(memberof=dn of group)" samaccountname

 

that search ou specify , users member of group specified in dn.  

thanks

 

mike


http://adisfun.blogspot.com;


Windows Server  >  Directory Services



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Event ID 64,77,1008 Certificates Events Windows Server 2008, 2008R2