When an Exchange 2010 mailbox has been disabled it becomes a disconnected mailbox.  Disconnected mailboxes sit in the mailbox database until the configured retention period has lapsed, and then they are purged.

You can see the retention period for a mailbox database by opening it’s properties and looking on the Limits tab.

How to Reconnect a Disconnected Mailbox in Exchange Server 2010
Exchange 2010 mailbox database retention settings

In the example above a disconnected mailbox will remain in the database for 30 days before it is purged.

Sometimes within the retention period we want to recover the mailbox, for example if it was accidentally disabled or if the staff member returns to the company.

How to List all Disconnected Exchange 2010 Mailboxes

The Exchange Management Shell lets us find the disconnected mailboxes in the organization.

[PS] C:\>Get-MailboxDatabase | Get-MailboxStatistics | where {$_.DisconnectReason -ne $null} | ft displayname,database,disconnectreason -auto

DisplayName Database DisconnectReason
----------- -------- ----------------
Alan Reid   MB-HO-01         Disabled
TestMB BR   MB-BR-01      SoftDeleted
Aisha Bhari MB-BR-01      SoftDeleted

Notice there are two disconnect reasons shown above.

  • Disabled – means the mailbox was disabled
  • SoftDeleted – means the mailbox was either removed or moved between databases

Here is an explanation of the difference between removing and disabling a mailbox in Exchange 2010 if you aren’t already familiar with it.

Disconnected mailboxes can be reconnected to an Active Directory user account. If no account exists for the person you want to reconnect a mailbox to then you would first create the account in Active Directory. Then you can reconnect the mailbox.

How to Connect an Exchange 2010 Mailbox to a User Account

To reconnect Alan Reid’s mailbox to his existing Active Directory account we would run this command.

[PS] C:\>Connect-Mailbox -Identity "Alan Reid" -Database MB-HO-01 -User Alan.Reid

However, if the user already has a new mailbox they are using and you wish to restore the disconnected mailbox into that new mailbox then you would use the next method shown here.

How to Restore a Deleted Mailbox to a User’s Mailbox

A soft deleted mailbox needs a different method used. To restore the deleted Aisha Bhari mailbox to the current mailbox for that user we would run this command.

[PS] C:\>New-MailboxRestoreRequest -SourceDatabase MB-BR-01 -SourceStoreMailbox "Aisha Bhari" -TargetMailbox "Aisha Bhari"

Name                                           TargetMailbox                                  Status
----                                           -------------                                  ------
MailboxRestore                                 exchangeserverpro.net/Company/Users/Branch ... Queued

The request goes into a queue for processing. You can monitor the progress of the request with this command.

[PS] C:\>Get-MailboxRestoreRequest

Name                                           TargetMailbox                                  Status
----                                           -------------                                  ------
MailboxRestore                                 exchangeserverpro.net/Company/Users/Branch ... Completed

If you’re trying to reconnect a disconnected archive mailbox you may receive an error for the legacy DN not matching. Check out Chris Brown’s post here for the solution.

About the Author

Paul Cunningham

Paul is a former Microsoft MVP for Office Apps and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul no longer writes for Practical365.com.

Comments

  1. Eduard Kalweit

    Hi Paul,

    I would like to join the previous comments and give you a big thank you.

    Kind regards
    Eduard

  2. Csaba papp

    Hi Paul,
    I try to reconnect a deleted mailbox using this procedure, however I am getting error that the mailbox doesn’t exist. BUT exists, because the get-mailboxstatistics confirms it. I did it on Exchange 2010 ,Version 14.3 (Build 123.4).
    thanks.

  3. JuanZQ

    Great article! I have a little question:

    Is it possible to reconnect a disabled mailbox from a recovery database?
    This is my scenario:
    Day 1=Mailbox1 created on Database1
    Day 25=Mailbox1 disabled on Database1
    Day 31=Database1 backed up (Mailbox1 is in disconnected state for 30 days default retention)

    Now, 45 days after backup, I need to restore Database1 from backup to recover disconnected Mailbox1.
    Is this possible?

    1. Paul Cunningham

      Users/clients can’t connect to a recovery database, so you’ll need to restore the mailbox from the recovery database to another mailbox database.

  4. chirs

    Is there a way to do this without enabling the default email address policy? I’m trying to create linked mailboxes in a two forest migration scenario, but every time I do all of the proxy information from the source gets wiped out by the Default email address policy after connect-mailbox command. This includes the removal of some x500s that were added to ensure mailflow when we removed the contact objects which were pointing back at the source forest prior to the cross forest mailbox move.

    Thanks!

  5. Ahsan

    Hi Paul,
    Excellent site and always to the point and easy to understand. Works all the time.

    I have couple of questions.

    1: there are a lot of articles relating to Exchange 2010 but the is no category in your site for it like you have for other versions of exchange and powershell etc. Am I missing something here? It would be good to see all article for exchange 2010.

    2: can you write up some articles on exchange server design that are more real world. Like if organizations use different internal domain names like ABC. Local and different external domain name like ABC. Com..
    And what firewall rules to be created for outside communication to our exchange servers.

    A million thanks

  6. Mat

    I restored a mailbox and connected to already existing account. But when i login to it it shows account disabled. any guess ?

      1. Matt

        Paul – He may be referring to the same thing I have been experiencing when trying to reconnect a disconnected mailbox. In my case I have recreated the AD user object and then attached the disconnected mailbox…although mine is a a room mailbox….which has to be disabled to work. Once connected I add full access permissions to my own account. When I try to logon to the reconnected mailbox through OWA I get “your account has been disabled’. Obviously mine is not disabled. Although I should be able to logon to this account in this way even though it is disabled I did try enabling the room account, completing sync and then trying again. Still get the ‘your account has been disabled’ error. I have checked attributes, run database cleanup, etc. and no change.

  7. Brian

    Hi Paul,

    I’m trying to connect a disconnected mailbox to a new user, but I’m not able to open it in MS outlook. On Outlook it’s showing this error:

    “Cannot open default e-mail folders. You must connect to Microsoft Exchange with the current profile before you can synchronise your folders with your Outlook data file (.ost).”

    The objective I’m trying to achieve here is trying to connect User A disconnected mailbox to new User B.

    – User A email address, before disconnection is as follows: UserA.abc@xyz.com
    – Does UserB have to use back the same email address, or it can take on UserB.abc@xyz.com, but connect User A mailbox to UserB and using UserB email address ?

    Are there any AD attribute modification that needs to be done for this to work ?

    Any help would be greatly appreciated, I have been working on this for days, without any success.

    Thank you very much.

    Brian

    1. Paul Cunningham

      What is the command you used?

      Have you tried opening the mailbox in OWA instead of Outlook?

      1. Brian

        Hi Paul,

        Thanks for the reply.

        This was done in EMC. I had tried accessing via OWA. It’s prompting for user ID and password again, even after I have login to OWA using UserB ID and password, so I’m assuming exchange is referring to User A ID and password and OWA return a blank page with no error or whatsoever.

        Does having UserA as a Mail User in exchange affect anything? Even with User A mailbox being disconnected ?

        Regards,

        Brian

        1. Paul Cunningham

          Why is UserA a mail user?

          Aside from that, the way I demonstrate it in the article above should work fine. If you’re deviating from that guidance and running into problems, then my recommendation is you try it the way I’ve demonstrated it.

  8. Vikas Bhadauria

    Hi Paul,

    Vikas here ,my query is mentioned below,please your guide lines is needed.

    1- How we can see recently disabled mailbox user in exchange server 2013 as clean-mailboxdatabase cmd removed.
    2-What is the maximum limit for deleted items on database level and what is the maximum limit for deleted mailbox retention we can set, as when checked in ecp its showing we can put a value from 0-24855 days.

    Your guidelines and support is highly appreciated.

    Regards,
    Vikas

  9. swaminand

    so i want disconnection at once .thank you

  10. swaminand

    i m not at all satisfied with the connect service .it does not work well.i could not access it the time it,s been given the plan due to technical issues.moreover i m getting shifted to amritsar this month .

  11. HAHA

    PLEASE RUN Clean-Mailboxdatabase -database . IT WORKZSS

  12. Zural

    Reading the comments i simply cant get my answers. For my case , I accidently deleted a user mailbox and just couldn’t restore it cause i cant seem to find the existing user profile on matching accounts . Going back and checking existing mailboxes the user is listed but couldn’t when using the wizard to restore.

    Please help!

  13. Boaz

    Hi Poul, thank you for this great article.
    I am wondering, is it possible to attache a disconnected mailbox to a different (new) user?

  14. Mário Gonçalves

    Explained in a way as for a 5 year old child could do! 🙂

  15. SOHO

    What does one do when the disconnected mailbox has an Inbox rule? My restores keep failing because of a inbox rule that is set on the disconnected box.

  16. Brian M

    Hello… I have two disconnected mailboxes named the same thing. How can I execute the Connect-Mailbox command using the MailboxGuid instead of the -Identity?

    1. trank0

      You can use de MailboxGuid as an Identity, MailboxGuid is an Identity, just put it instead the name of the mailbox or the email, and it will work.

  17. Lars Panzerbjørn

    Excellent article.
    If you have trouble making a MAPI connection to the mailbox afterwards, it might work if you clean the database.
    I like: Get-MailboxServer | Get-MailboxDatabase | Clean-MailboxDatabase

  18. sachin ps

    Thanks paul for your wonderful support

  19. Patrick Witt

    using exchange 2010, im trying properly restore a disconnected mailbox. in one of the attempts i tried, i connected it to a local administrator user (i know dumb idea) and at this point i can log into webmail fine but forwarding email doest not work.. Error “a problem occurred while you were trying to use your mailbox.”

    and if i check the calendar settings (which i dont need) i get the error “cannot open mailbox, microsoft sys attendant. it was running the command get calendar processing”….

    any help would be appreciated

  20. Andro

    A restored mailbox should be available after an AD sync.
    You could force AD sync by logging on the Global Catalog AD and running C:\>repadmin /syncall

    note: Might need Administrator privileges for the above.

  21. Mike

    after restoring a mailbox, how long until it becomes usable again? i don’t think it is syncronizing with my active directory quickly, is there a way to force it? thank you.

  22. Fernandes

    I have been restore deleted mailbox, I used the following command

    Get-MailboxStatistics -Database DB.01 | Where { $_.DisconnectReason -eq “Disabled” }| Format-List LegacyDN, DisplayName, MailboxGUID, DisconnectReason

    LegacyDN : /O=EMAILEXCHANGE/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=MEU.USUARIO838
    DisplayName : meu.usuario
    MailboxGuid : c60fff7b-fa6f-47d6-b44c-264936dad2ba
    DisconnectReason : Disabled

    I created the user deleted with same information and I perform command
    New-MailboxRestoreRequest -SourceDatabase DB.01 -SourceStoreMailbox c928294c-4665-4cc4-ba5e-38f67474fab2 -TargetMailbox meu.usuario@dominio.com -AllowLegacyDNMismatch

    But status stay “Queued” all the time
    Could you help me?

    New-MailboxRestoreRequest -SourceDatabase ieclb.org.br.01 -SourceStoreMailbox c928294c-4665-4cc4-ba5e-38f67474fab2 -TargetMailbox @ieclb.org.br -AllowLegacyDNMismatch

  23. Felix

    Thanks. Today I read your article and successfully connected a user disabled.
    Regards

  24. Jan Vinterberg

    For some reason even though the limits in the mailbox properties on my server is identical with the one in this article, i can not find disabled mailboxes anywhere when using the cmd:
    disable-mailbox -identity “UserName”
    Same goes if i disable the account from EMC.

    Any ideas on why this is the case ?

    brgds
    Jan V.

  25. Lula

    Thank you for your post, it helps me. But If we are restoring mailbox in another mailbox we must use -AllowLegacyDNMismatch key. Than you one more time.

  26. Redberry

    In Exchange 2010 SP2 – can New-MailboxRestoreRequest cmdlet use to restore a disconnected to a new/existing AD account ?? or this cmdlet is simply for restoring onto an existing mailbox?

  27. Redberry

    You mentioned in article that
    ■SoftDeleted – means the mailbox was either removed or moved between databases
    Is this only apply to Exchange 2010 sp1?

    When we Remove a mailbox (using EMC or Remove-mailbox), it is actually marked as “Disabled” instead of SoftDeleted? We running Exchange 2010 SP2.

    1. Paul Cunningham

      The article was written in the SP1 era, and I just tested again and I see the same “Disabled” reason as you. Not sure if its changed with SP2 or just an error with the article.

      1. Redberry

        Thank you for the confirmation.

  28. SanMan

    And to purge the disconnected mailbox use:

    Remove-StoreMailbox -database AtoF -Identity “Doe, John” -MailboxState SoftDeleted
    and replace the identity with the displayname of the user. This has to be displayname, cant be login name or alias.

  29. DC

    Wonder if you can help quickly. I’m trying to restore the contents of a recovered mailbox to a user whose account had to be re-created (someone deleted the account from AD….). When I use your Restore a Deleted Mailbox to a User’s Mailbox instructions, I get an error that says the user “has no archive.” What does that mean and how do I fix that? Thanks!

  30. Jason

    I don’t know if anyone’s ever told you this, but you, Sir, are a genious!!! This article and countless others on your site have made working with Exchange 2010 a breeze!! Thank you for all that you do on this site!

    1. Paul Smyth

      I would second that!

Leave a Reply