Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2020
  • Last Modified:

Add users from one AD group to another AD group.

Hi.

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

Br
Kenneth
0
QC20N
Asked:
QC20N
1 Solution
 
Haresh NikumbhCommented:
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
 
MisterTwelveCommented:
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
 
VirastaRCommented:
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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Tackle projects and never again get stuck behind a technical roadblock.
Join Now