Solved

Create multiple groups in Powershell

Posted on 2014-10-03
2
255 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
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 setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

805 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