Solved

Create multiple groups in Powershell

Posted on 2014-10-03
2
270 Views
Last Modified: 2014-10-29
Hi- I need a simple powershell script to create multiple global security groups.
0
Comment
Question by:LazaroB
2 Comments
 
LVL 29

Accepted Solution

by:
becraig earned 500 total points
ID: 40360666
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
 

Author Closing Comment

by:LazaroB
ID: 40410854
Thank you.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OfficeMate Freezes on login or does not load after login credentials are input.
This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question