Mapping disconnected mailbox in 2007 and 2010 via PS or? RRS feed

  • Question

  • I have a scenario where I need some help...

    Customer is onboarding endnuser 100/200 a month and have a system for doing this.

    Problem is when users return/same user is rehired. This happens a lot - the system they have in place have procedure deleting the user and the recreates the same user with same id to ensure everything is deleted. This is due to security and making the mailboxes disconnected on 2007

    I need a solution to address this..

    I found a manual workaround I need to automate - problem is they need to be on 2010 to make it work - and migrate all terminated mailboxes (they keep them for 2 years) to 2010 if the scenario a user returns an demands the old mailbox to be available...

    The problem is the customer does not want everything to be deleted - they want the user to get the same mail data (and home drive and profile) if they are rehired within 2 years. They have always done this manually, but is has not been implemented by the system.

    So the problem is when creating a new user – system delete old use and recreates a new user to remove all security. Hence the connection to Exchange is dropped and we have a disconnected mailbox

    My idea is to search for old mailbox for the same user and import old mail data to the new mailbox (maybe delete old mailbox)??

    This run once a day.

    According to them they have a lot of these so manually doing this is not an option.
    I found a solutions doing it

    • Get-MailboxDatabase | Clean-MailboxDatabase
    • Get-MailboxDatabase | Get-MailboxStatistics | where {$_.DisconnectReason -ne $null} | ft displayname,database,disconnectreason -auto
    • New-MailboxRestoreRequest -SourceDatabase "mbxdb01 (EXCHMBX50)" -SourceStoreMailbox "10e69160-827-4c3d-921b-992juy854b59" -TargetMailbox "kiada" -AllowLegacyDNMismatch
    • Get-MailboxRestoreRequest

    mbxdb01 (EXCHMBX50) location
    10e69160-827-4c3d-921b-992juy854b59 is old account (disconnected)
    kiada new mailbox

    Friday, February 1, 2013 9:30 AM