Skip to content
2009/07/15 / Stijn Vermoesen

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:

Parentcontainer,Name,Grouptype,GroupScope
“OU=Sharepoint,DC=domain,DC=local”,SecurityGroup01,Security,DomainLocal

Advertisement

3 Comments

Leave a Comment
  1. Joshua / Aug 4 2010 02:00

    Worked a treat thanks very much!

  2. Charles Pippin / Jan 13 2011 21:00

    One small change.. The header of your csv file must have each header object name in quotes. Other than that small change, this works GREAT!

    Thank you for sharing!

Trackbacks

  1. Bulk Creating Active Directory groups « Alfa BBT « Domain Namez

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 86 other followers