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 (18k 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

Hi, I'm following the guide about scheduling a user import from a CSV file: Schedule Import of Users from CSV but I get the following error: *"The input object cannot ... <ScriptBlock>, <No file>: line 7". Any help would be much appreciated. Dario

asked Dec 17, 2019 by winstonsmith (40 points)
0 votes
1 answer

I am trying to make the amount of users using csv. I noticed when I use the "Manager" field of the error. Question1: How should I put the information? Initially I put the ... "Tony Stark". Question2: Can I import the users and set the group in the csv file?

asked Jun 18, 2019 by user1928 (550 points)
0 votes
1 answer

We are trying to get a scheduled task to run every Friday night at 10:00pm to pull the users needed to be fully deprovisioned by the custom command we have created.

asked Dec 2, 2016 by willy-wally (3.2k points)
0 votes
1 answer

Is it possible to import values for one of the custom attribute fields (i.e. CustomAttributeText1) from a CSV file using PowerShell? Every user in our organization is assigned ... how to import the values into Adaxes. Thanks in advance for any assistance...

asked Nov 4, 2014 by RickWaukCo (300 points)
0 votes
1 answer

Is it possible to import a list of user CN values via CSV file into the basket of the web interface or the console to perform an operation?

asked Aug 15, 2014 by rgreggs (250 points)
2,554 questions
2,297 answers
6,126 comments
661,961 users