Jerry Seinfield
asked on
active directory export users from security/distribution group to spreadsheet
Hello Experts,
can someone please provide me with a script to export all members of nested security and or distribution group and export all members of the groups and subgroups to a spreadsheet?
can someone please provide me with a script to export all members of nested security and or distribution group and export all members of the groups and subgroups to a spreadsheet?
You don't really need a script for that. You can just use this:
Get-ADGroupMember 'group name' -Recursive | export-csv C:\groupmembers.csv -notype
ASKER
will this work for nested groups?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes,
The script that I posted above does the export to the spreadsheet as well as the recursive within the nested group.
It does more than the simple Technet script.have you tried it ?
The script that I posted above does the export to the spreadsheet as well as the recursive within the nested group.
It does more than the simple Technet script.have you tried it ?
Try this script below:
1. Main Script
Open in new window
2. Execution script
Use the below script and then save it as the second file that you can customize according to your environmentOpen in new window
Let me know how it goes.