troubleshooting Question

Scripting changes to groups in AD

Avatar of averyb
averybFlag for United States of America asked on
Windows Server 2003Active Directory
1 Comment1 Solution249 ViewsLast Modified:
I need to make changes to AD fairly often--once to a development environment and then again in production.  These AD changes are typically creating new global security groups in specific OUs and then adding existing global security groups to these groups.   The group names are very long and I need to drill down pretty deep into the OU tree.  I'd rather not have to do it twice (i.e. once in Dev and once in Prod), so I was thinking that a script would make things easier.  The group names will contain several spaces, so the script needs to be able to handle that.  Any one change is typically limited to one OU.  All groups are contained in the one domain.

I'm running in Windows 2003 AD in native mode.  

I'm thinking of a solution with the following characteristics:
Script calls some command and then uses a .txt file for all the parameters.
A parameter which I can use to specify the OU path.
A parameter which I can use to specify the domain name.
Can be assumed that the groups are always global security groups, so don't need way to change that.
A list of global security groups to add.
A list of existing global security groups to add to the newly created global groups.

"dsadd group" seems like it can do what I want, but I don't see a way to make it read a file for the parameters that I need.  I guess having a bat file with multiple dsadd group commands would work.  But I don't see how to designate the OU in which to create the new group.
ASKER CERTIFIED SOLUTION
Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 1 Comment.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 1 Comment.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004