How to phase out Exchange archive mailboxes

A customer wants to phase out their Exchange archive mailboxes. There are no reason for them to keep them. Back then they were told about cheap storage and large ost files, but all their data is placed on the same SAN and they are soon using Outlook 2013. They have about 10.000 mailboxes and they are about to migrate from Exchange 2010 to 2013. My recommendation is to do this before the migration to prevent a lot of whitespace in the databases if they do it afterwards.

They have had archives for three years and they have a retention policy moving all mailbox content older than one year to the archive.

My plan is the following.

  • Export all the mailboxes to a csv
  • Disable the archives
  • Restore the disabled archive into the primary mailbox.

First lets Export the mailboxes to a csv. I will split this up and do it in steps. In my lap I’ll take all the users starting with “A”.

I want the following attributes: Name, Displayname, Alias, ArchiveGuid, ArchiveDatabase, DisabledArchiveGuid, DisabledArchiveDatabase (The last two should be empty unless the archive is allready disabled).

Archive01Get-Mailbox -Resultsize Unlimited | where {$_.Displayname -like ‘A*’} | Select Name, Displayname, Alias, ArchiveGuid, ArchiveDatabase, DisabledArchiveGuid, DisabledArchiveDatabase | Export-Csv c:\Temp\Archive_A.csv -Encoding Unicode

The output should look like this

Then we will disconnect the archives for all the users.

Archive03Import-Csv c:\Temp\Archive_A.csv | foreach {Disable-Mailbox -Archive -Identity $_.Alias -Confirm:$false}

Now we will import / restore the disconnected archive into the primary mailbox for each user

Archive04Import-Csv c:\Temp\Archive_A.csv | foreach {New-MailboxRestoreRequest -SourceDatabase $_.ArchiveDatabase -SourceStoreMailbox $_.ArchiveGuid -TargetMailbox $_.Alias -ExcludeDumpster}

Now we just have to wait for the restore to finish 🙂

One final detail. We will have to tell the users that they can not restore deleted items from the archive, since we don’t import the content from the dumpster.

Thanks for reading

Leave a Reply

Your email address will not be published. Required fields are marked *