Link to home
Start Free TrialLog in
Avatar of jmohan0302
jmohan0302

asked on

Group creation

I have to create multiple Universal group in the active directory. Is there any scripts to do so to give the list of groups as a input file and the script has to read the names from the input file ? Or how to achieve the same through CSVDE? Thanks
Avatar of Joseph Daly
Joseph Daly
Flag of United States of America image

Are you just creating the groups or do you want to populate them also?
Avatar of jmohan0302
jmohan0302

ASKER

I have to create the groups in  Active Directory and also the description and the Email Address for the group as it is a Universal Distribution group. I need to create a multiple Universal Distribution group so I am looking for a script or a command to do this. Thanks
Using the quest powershell cmdlets to create groups would be similar to below.

Import-CSV {filename}.csv | ForEach{ new-qadgroup -name $_.name -parentcontainer "OU=Destination,DC=domain,DC=com" -groupscope universal}


The following will take a CSV file with a column named Name and create the groups using that. The top row of the CSV must be named name for this to work correctly.
If they are going to be distribution groups then you will need to use the code below.

Import-CSV {filename}.csv | ForEach{ new-qadgroup -name $_.name -parentcontainer "OU=Destination,DC=domain,DC=com" -groupscope universal -grouptype distribution}
Thanks. What should be the content of the filename.csv.  Also I need to have the description and email address of each group
ASKER CERTIFIED SOLUTION
Avatar of Joseph Daly
Joseph Daly
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Could you provide me the sampe CSV file
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial