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
Solved

Add users from one AD group to another AD group.

Posted on 2013-06-17
4
1,703 Views
Last Modified: 2013-06-17
Hi.

Is there an easy way to add users to an AD group by using the comtent of another AD group?

Br
Kenneth
0
Comment
Question by:QC20N
4 Comments
 
LVL 22

Expert Comment

by:Haresh Nikumbh
ID: 39252522
you can use powershell  script for transfer user from one group to another


Powershell code


Import-Module ActiveDirectory
$Group_BUsers = Get-ADGroup Group_B -properties members | Select-Object members | % { $_.Members}
$Group_CUsers = Get-ADGroup Group_C -properties members | Select-Object members | % { $_.Members}
Get-ADGroup Group_A -properties members | Select-Object members | % { $_.Members} | % {
    if(!($Group_BUsers -contains $_) -and !($Group_CUsers -contains $_))
    {
        Add-ADGroupMember -Identity Group_B -Member $_
        $_
    }
    }



http://smulpuru.wordpress.com/2013/03/02/copy-ad-membersusers-from-one-group-to-another-using-powershell/
0
 
LVL 4

Expert Comment

by:mumbaiexperts
ID: 39252630
0
 
LVL 5

Accepted Solution

by:
MisterTwelve earned 500 total points
ID: 39252661
In AD users and computers console, create new query with this definitions:

Custom Search
Field
User
MemberOf
Condition = Is Exactly
Value = Distinguieshed Name of Group

After you have list of users members of this group, only need to select all, right click with mouse and Select option Add to group.

This is the simple way.
0
 
LVL 9

Expert Comment

by:VirastaR
ID: 39252666
Hi,

What AD Environement you have 2003/2008/2012???

Answer will vary depends on your environment details.

However check this

http://www.petri.co.il/forums/showthread.php?t=50826

Hope that helps :)
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

791 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