Solved

Copy users from one group to another in Active Directory

Posted on 2009-05-15
2
2,415 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
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 500 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

This article explains how to install and use the NTBackup utility that comes with Windows Server.
In-place Upgrading Dirsync to Azure AD Connect
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

680 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