Add members from another AD to a group

Welcome Forums General PowerShell Q&A Add members from another AD to a group

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 7 years, 8 months ago.

  • Author
  • #6259

    Topics: 1562
    Replies: 0
    Points: 0
    Rank: Member

    by tim91700 at 2013-01-16 00:06:24


    I have two domains :

    -d1 : i'm here
    -d2 : it's the domain of my company

    I want to create a copy of groups with names from a txt file, like :
    These groups already exist on d2.

    I want to copy all members of d2.toto in d1.toto.
    It like that with the active directory interface :

    -Select the new group d1.toto
    -Add member and search on d2 with toto as name
    -Click to confirm with credential

    Is it possible ?

    by RichardSiddaway at 2013-01-16 05:15:40

    Are these two totally separate domains or are they in the same forest?

    Yes this is possible. I can't test this at the moment but you could create the groups
    $groups = get-content groupnamefile.txt
    foreach ($group in $groups){
    new-adgroup -Name $group -samAccountName $group -GroupScope Global -GroupCategory Security

    It sounds like you just want a copy of the company domain for test purposes. Why not do a backup and restore?

The topic ‘Add members from another AD to a group’ is closed to new replies.