Distribution Group in domain by using DSget tool – a new tool introduced in
Windows 2003. This tool and other related tools ships with Windows 2003 CD.
Let’s say you need to gather a list of users (+nested groups) from a domain group. This is bit easy. You can use the following command to accomplish the goal:
dsget group “DN_of_group” -members -expand > userlist.txt
The output will be saved in userlist.txt
This is the sample output saved in userlist.txt
“CN=Tapihe C Mdwa,OU=Users,DC=test,DC=local”
and so on…