Bulk Creating Active Directory groups

One of my colleagues gave me a list of AD groups for the sharepoint environment he’s confguring. Instead of creating them manually I used the Quest ActiveRoles management shell.

import-csv 'SecurityGroups.csv' | foreach {  
New-QADGroup -Parent \$\_.ParentContainer -Name \$\_.Name -sAM
\$\_.Name -GroupScope \$\_.GroupScope -GroupType \$\_.GroupType  

This script imports a .csv file to create the security groups. The .csv file contains the OU distinguished name, the group Name, the group type (security or distribution) and finally the scope (Domain Local, Global or Universal).

It looks like this:


Share this post: