locked
How to move all disconnected mailboxes from one mailbox to another at once on exchange 2007 SP3 RRS feed

  • Question

  • I just want to move all disconnected mailboxes from one mailbox to another at once on exchange 2007 SP3. Someone can help me? Thanks.

    I seek opportunity

    Thursday, July 23, 2015 8:57 AM

Answers

  • Create a CSV like below

    Mailbox         ADUser          Database
    Mike Witts     Mike Witts     Database1
    John Smith    John Smith     Database2

    Then use this

    $DisMailBoxes = Import-csv "c:\filename.csv"
    ForEach ($M in $DisMailboxes) {
    $M.Mailbox
    $M.ADUser
    $M.Database
    Connect-Mailbox -Identity $M.Mailbox -Database $M.Database -User $M.ADUser
    }

     

    Thanks, MAS
    Please mark as helpful if you find my comment helpful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

    Thursday, July 23, 2015 10:13 AM

All replies

  • Create a CSV like below

    Mailbox         ADUser          Database
    Mike Witts     Mike Witts     Database1
    John Smith    John Smith     Database2

    Then use this

    $DisMailBoxes = Import-csv "c:\filename.csv"
    ForEach ($M in $DisMailboxes) {
    $M.Mailbox
    $M.ADUser
    $M.Database
    Connect-Mailbox -Identity $M.Mailbox -Database $M.Database -User $M.ADUser
    }

     

    Thanks, MAS
    Please mark as helpful if you find my comment helpful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

    Thursday, July 23, 2015 10:13 AM
  • Hi Alice,

    Get-Mailbox  | where {$_.DisconnectDate -ne $Null} | Move-Mailbox -TargetDatabase "Target Server\First Storage Group\Mailbox Database name"


    ▼ Mark if Answer / Vote if Helpful ▲
    MCSE: Messaging 2013 Charter / Private Cloud / Server Infrastructure <a href="http://MaximumExchange.ru/">MaximumExchange.ru</a>

    Thursday, July 23, 2015 10:35 AM