Solved

Copy users from one group to another in Active Directory

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Easy CSR creation in Exchange 2007,2010 and 2013
In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
To show how to generate a certificate request 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 Servers >> Certificates…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now