locked
Batch to move mailboxes for users belonging to a specific group RRS feed

  • Question

  • Hi,

    I'm at the stage to move mailboxes from Exchange 2007 to 2010 as part of an Exchange upgrade.

    I need to script a move a group of mailboxes belonging to users member of the same group. In other words, I need to move in one single batch a number of users member of the same group.

    I can gather the list of users with a dsquery cmdlet: dsquery group -name "Group one" | dsget group -members

    In this way I'll get the list in DN format.

    There's a way to pipeline this list in the New-MoveRequest cmdlet?

    Or any other idea?

    Thanks!

    Alessandro.

    Thursday, February 23, 2012 2:18 PM

Answers

  • Give this a try, i put all the usernames in a text file and ran the PowerShell command below. Just change the highlighted sections to match your environment.

    Get-Content C:\users_db1.txt | New-MoveRequest -TargetDatabase users_db1 -BadItemLimit 50


    george

    • Proposed as answer by Zi Feng Thursday, March 1, 2012 6:38 AM
    • Marked as answer by Zi Feng Friday, March 2, 2012 1:46 AM
    Sunday, February 26, 2012 3:34 AM

All replies

  • Give this a try, i put all the usernames in a text file and ran the PowerShell command below. Just change the highlighted sections to match your environment.

    Get-Content C:\users_db1.txt | New-MoveRequest -TargetDatabase users_db1 -BadItemLimit 50


    george

    • Proposed as answer by Zi Feng Thursday, March 1, 2012 6:38 AM
    • Marked as answer by Zi Feng Friday, March 2, 2012 1:46 AM
    Sunday, February 26, 2012 3:34 AM
  • Hi Alessandro

    Any update?

    Cheers

    Zi Feng


    Zi Feng

    TechNet Community Support

    Thursday, March 1, 2012 6:38 AM