• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 350
  • Last Modified:

Create multiple groups in Powershell

Hi- I need a simple powershell script to create multiple global security groups.
0
LazaroB
Asked:
LazaroB
1 Solution
 
becraigCommented:
If you have a list of names in a text/csv file and the corresponding target OU:

import-csv file.csv | % {
NEW-ADGroup –name $_.Name –groupscope Global –path $_.OU
}

Open in new window


This is with the idea of you have a comma separated file as below

Name, OU
acctgroup, "OU-path"
mktgroup, "OU-Path"
0
 
LazaroBAuthor Commented:
Thank you.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now