Hey thanks for the help. I was able to get it to work. Here is a copy of the script if anyone would want to use it.
# Get member list for each group and stuff into file named for group
# Assumes C:\some\path\groups.txt has one DN per line
open(GROUPS,"<c:\\groups.txt") or die ("Can't open C:\\groups.txt");
while(<GROUPS>) {
chomp($_);
print "$_\n";
@stuff=split(/"/,$_);
$members=`dsget group $_ -members -expand | dsget user -display`;
open(OUT,">d:\\test\\$stuff[1]");
print(OUT $members);
close(OUT);
}
close(GROUPS);
that will run the query, create the text file for each group object, and enumerate the users in each of those files.
works well
if you want to learn about dsget and dsquery if for some reason you are ever on a windows network, check out
www.technet.com and search, there are several whitepapers on the subject.
Thanks again for your help. Sorry i couldnt make it a little clearer
Joe