Avatar of averyb
averybFlag for United States of America

asked on 

Scripting changes to groups in AD

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.
Windows Server 2003Active Directory

Avatar of undefined
Last Comment
Brian Pierce
ASKER CERTIFIED SOLUTION
Avatar of Brian Pierce
Brian Pierce
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Windows Server 2003
Windows Server 2003

Windows Server 2003 was based on Windows XP and was released in four editions: Web, Standard, Enterprise and Datacenter. It also had derivative versions for clusters, storage and Microsoft’s Small Business Server. Important upgrades included integrating Internet Information Services (IIS), improvements to Active Directory (AD) and Group Policy (GP), and the migration to Automated System Recovery (ASR).

129K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo