CSVDE doesn't query child domains

I'm trying to generate a report for a customer that lists out display name, office and description for each member of each distribution list they have in AD.

I hacked something together using csvde but it's giving me unexpected results...  The Forest at this customer consists of a parent (root) domain and two child domains.  All the distribution lists are located in the parent/root domain.  When I run my mini-script against the OU that contains all of the distribution lists though, I only get results if the user account is found in the parent domain.  Any users that are in child domains simply don't show up in the report...  I feel like I'm missing something simple here but I can't find it for the life of me.

Attached is my little script that I've been running so far.

Thanks,
Travis
@echo off
 
if exist groups.txt del groups.txt
dsquery group "OU=DistributionLists,DC=domain,DC=com" >groups.txt
 
for /f "tokens=*" %%g in (groups.txt) do csvde -f %%g-report.txt -s rootdc2 -r (memberof=%%g) -l displayname,physicaldeliveryofficename,description,mail

Open in new window

LVL 3
trturner123Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

trturner123Author Commented:
Solved this a different way...

http://imanami.com/

The evaluation version was enough to get the report my customer needed.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.