This batch file script can be used to list group membership details. You can add all user names (samaccoutname) to the input file -Users.txt. The output will be in the Output.txt file.
I created this script based on this question posted on the TechNet forum
FOR /f %%i in (C:\Users.txt) do (
Echo %%i >> output.txt
Dsquery user –samid %%i |dsget user -memberof –expand >> Output.txt
You can also see a PowerShell script on the following link: