I would like to check with a batch script if a user is member of a group
this should work with dsquery instead of ifmember
how can i use dsquery to make a simple if true then goto line xx query?
dsquery * domainroot -filter "(&(objectClass=group)(name=theGroup))" -l -d domain.local -attr member | find /c "Test UserA"
This will give me a value if there is any user in "theGroup"
Test UserA is in the Group one time so the result is 1
if i check for "Test User" it will give me the Result 4, because the text is part of Test UserA
Test UserB... so not a perfect solution any other ideas?