locked
Export group membership into a new group RRS feed

  • Question

  • Exchange 2007/2010 mixed environment. We have a business unit with 100 populated DEV groups, and they now want 100 QA groups created with the same members (new group name is the same as the old group name, with "DEV" replaced by "QA"). I have the new empty groups created. How can I dump out the membership of an old group to an array and use the array to import them to the corresponding new group. I have a CSV file matching old group name to new group name.
    Friday, May 4, 2012 1:48 PM

Answers

  • You can try this:

    $Members = (Get-Group -Identity "Old Group Name").Members
    New-DistributionGroup -Name "New Group Name"
    $Members | Add-DistributionGroupMember -Identity "New Group name"
    
    You'll probably need to experiment with the technique in your particular environment.

    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

    • Proposed as answer by Mike Crowley Sunday, May 6, 2012 3:01 AM
    • Marked as answer by davrion Monday, May 14, 2012 6:12 PM
    Friday, May 4, 2012 7:46 PM

All replies

  • You can try this:

    $Members = (Get-Group -Identity "Old Group Name").Members
    New-DistributionGroup -Name "New Group Name"
    $Members | Add-DistributionGroupMember -Identity "New Group name"
    
    You'll probably need to experiment with the technique in your particular environment.

    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

    • Proposed as answer by Mike Crowley Sunday, May 6, 2012 3:01 AM
    • Marked as answer by davrion Monday, May 14, 2012 6:12 PM
    Friday, May 4, 2012 7:46 PM
  • Hi,

    How is the issue now?


    Xiu Zhang

    TechNet Community Support

    Friday, May 11, 2012 2:47 AM
  • Yes, that command did the trick.

    Thanks!

    Monday, May 14, 2012 6:11 PM