0 votes

Hello,

I have an immediate requirement for the following, can you let me know how to handle it using Adaxes:
1. Export members of an AD group to CSV (including members of the nested groups).
2. Adding existing users to an existing AD group in bulk with the CSV file.

by (70 points)

1 Answer

0 votes
by (18.0k points)
selected by
Best answer

Hello,

It's possible to do this using the Adaxes PowerShell module:

Export group members to a CSV file:
Get-AdmGroupMember "CN=Group,DC=domain,DC=com" -Recursive | Export-Csv "C:\members.csv" -NoTypeInformation

Add members to a group from a CSV file:
Import-Csv "C:\members.csv" | ForEach-Object {Add-AdmPrincipalGroupMembership $_.ObjectGuid -MemberOf "CN=Group2,DC=domain,DC=com"}

0

Thanks Eugene! You saved me a day.

0

We are always glad to help.

Related questions

0 votes
1 answer

Hello, Similar to exporting the members of a group to a csv file: https://www.adaxes.com/script-repository/export-group-members-to-csv-file-s184.htm I am looking to ... would like to include the memberof csv report in the email as well. Thanks in advance!

asked Feb 7, 2023 by JonnyBGood (20 points)
0 votes
1 answer

Trying to test importing users via CSV. Running into the following error -- Error: The input object cannot be bound to any parameters for the command either because the command does ... in the Powershell script, but no luck -- Here's my scheduled task --

asked Apr 10 by msinger (210 points)
0 votes
1 answer

Hi support, [https://www.adaxes.com/questions/752/import-data-wizard] I am trying to do something similiar to this however in our csv file the column is called ... powershell task as you have highlighted to add the ldap value to the accountExpires attribute?

asked Feb 19 by MikeBeattie (110 points)
0 votes
1 answer

hello i'm new with Adaxes i'm try to creat schuadle task to import a spefice user list by thier username id after that just update City for them by bulk updating . kinly advise

asked Aug 29, 2023 by sudox (20 points)
0 votes
1 answer

Have a csv file of users that I need to import into Adaxes. I had initially found an article for this, but upon going today, it gave me an error (looks like it was deleted). Thank you

asked Nov 19, 2022 by wangl (20 points)
3,589 questions
3,278 answers
8,303 comments
548,107 users