I am trying to find a way to export the members of specific groups that I have display names of in a list. I need user attributes such as display name, email address, description, account creation date, and LastLogon.
I want to then export the data "ideally" per group from the list into a CSV, but if not, then something that would at least put the group name that is queried in a column in the CSV so the list could be sorted easily and the viewer would be able to see the members of each group by scrolling down. One CSV per group would be best.
Take a look at Quest Active Directory cmdlets. While this can be accomplished many ways using Get-AdGroupMember (with RSAT tools installed) or using ADSI, the Quest tools make it a one-liner because the cmdlet returns user data versus just the LDAP path of the member of the group.