?
Solved

Copy users from one group to another in Active Directory

Posted on 2009-05-15
2
Medium Priority
?
2,573 Views
Last Modified: 2012-06-27
I need to copy the the users in a group into another group.  I dont want to add the group itself because I am going to delete it.  This is in an exchange 2007 environment.  Thanks
0
Comment
Question by:TriCountyIT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Expert Comment

by:karstieman
ID: 24398531
You'll have to write a export script to export all users from the group.
There's no way to copy unless you copy the entire group you want to delete now and add this as member to your new group.
0
 
LVL 3

Accepted Solution

by:
PoorImpulseControl earned 2000 total points
ID: 24398726
you can use the ds* commands to accomplish it fairly quickly.

Assuming you created the group "NewGroup" in the OU "MyUsers" in the AD domain MyAD.local, and you wanted to copy all the users from OldGroup into NewGroup (this is all one command):

dsquery group "CN=OldGroup,OU=MyUsers,DC=MyAD,DC=local" | dsget group -members | dsmod group "CN=NewGroup,OU=MyUsers,DC=MyAD,DC=local" -addmbr

A similar scenario is documented in the help for
dsmod group /?
where it shows adding all the users from an OU into a group.

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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

Check out this step-by-step guide for using the newly updated Experts Exchange mobile app—released on May 30.
Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
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 to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

771 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