This script can be used to list group membership in Active Directory.
As you can see on the following screenshot, this script uses an input file called Glist.csv which contains all group names.
You will see the output on the screen as well as in the GroupDetails.csv file.
You can download the script from the following locations. Rename the file to .PS1
Modified Script – This script will prompt you for the Group distinguishedName (DN).