Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script to Merge members of 2 security groups into new group 2

Status
Not open for further replies.

Aek

MIS
Jun 18, 2004
10
US
Does anyone know of a VBScript to merge members of 2 AD security groups into a new group?
 
Not sure of a VBScript to do this as I have not tinkered much with VBScripting yet, but you can accomplish this task using Windows built-in directory service tools.

Here is an example that is given at the command line if you open up a command prompt and type dsmod group /?

To add all members of the US Info group to the Cananda Info group:

dsget group "CN=US INFO,OU=Distribution Lists,DC=microsoft,DC=com" -members | dsmod group "CN=CANADA INFO,OU=Distribution Lists,DC=microsoft,DC=com" -addmbr

The task you are looking to complete could easily be accomplished modifying the above command values to meet the specifics of your domain and security groups.

Joey
CCNA, MCSA 2003, MCP, A+, Network+, Wireless#
 
Giving IllogicallyLogical a star for the excellent answer. I would suggest you do the same. It's the proper ettiquete for thanking someone who provided assistance.

Pat Richard MVP
Plan for performance, and capacity takes care of itself. Plan for capacity, and suffer poor performance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top