SOLVED

Need to Restore Deleted Mailbox with a twist

%3CLINGO-SUB%20id%3D%22lingo-sub-393968%22%20slang%3D%22en-US%22%3ENeed%20to%20Restore%20Deleted%20Mailbox%20with%20a%20twist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-393968%22%20slang%3D%22en-US%22%3E%3CP%3EScenario%3A%3C%2FP%3E%3CUL%3E%3CLI%3EExchange%202013%3C%2FLI%3E%3CLI%3EUser%20Mailbox%20was%20Disabled%20via%20EAC%3C%2FLI%3E%3CLI%3EAD%20User%20object%20was%20not%20disabled%20or%20deleted%3C%2FLI%3E%3CLI%3EMailbox%20shouldn't%20have%20been%20disabled%2C%20so%20they%20scrambled%20to%20fix%20the%20situation%3C%2FLI%3E%3CLI%3EInstead%20of%20Re-connecting%20old%20mailbox%20to%20the%20user%2C%20a%20New%20Mailbox%20was%20created%26nbsp%3Bfor%20that%20user%3C%2FLI%3E%3CLI%3EThe%20AD%20User%20attribute%20%22legacyExchangeDN%22%20appeared%20to%20have%20a%20different%20GUID%20than%20the%20current%2Fnew%20mailbox%20GUID%3C%2FLI%3E%3CLI%3EDon't%20seem%20to%20be%20able%20to%20reference%20the%20originally%20deleted%20mailbox%3C%2FLI%3E%3CLI%3ENo%20longer%20appears%20in%20available%20Soft-Deleted%20mailboxes%3CUL%3E%3CLI%3EThe%20mailbox%20in%20question%20does%20not%20appear%20when%20I%20run%20the%20following%20cmdlet%3C%2FLI%3E%3CLI%3E%3CSPAN%20class%3D%22hljs-pscommand%22%3EGet-MailboxDatabase%3C%2FSPAN%3E%3CSPAN%3E%20%7C%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22hljs-pscommand%22%3EGet-MailboxStatistics%3C%2FSPAN%3E%3CSPAN%20class%3D%22hljs-parameter%22%3E%20-Filter%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'DisconnectDate%20-ne%20%24null'%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3ELooped%20through%20all%20of%20our%20Mailbox%20DBs%2C%20trying%20to%20perform%20a%20Get-MailboxStatistics%20-StoreMailboxIdentity%20GUID%2C%20using%20the%20former%20mailbox%20GUID%3C%2FLI%3E%3C%2FUL%3E%3CP%3ESuggested%20course%20of%20action%20here%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOur%20Commvault%20system%20isn't%20backing%20up%20down%20the%20mailbox%20level%2C%20just%20the%20database.%20Could%20I%20create%20a%20new%20Mailbox%20Database%20and%20restore%20last%20night's%20backup%20to%20that%20database%3F%20Then%20create%20a%20move-request%20from%20the%20restore%20database%20to%20the%20prod%20DAG%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWorst-case%20scenario%2C%20I'll%20request%20an%20Archive%20Recovery%20from%20Mimecast...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-393968%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E2013%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-394236%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20to%20Restore%20Deleted%20Mailbox%20with%20a%20twist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-394236%22%20slang%3D%22en-US%22%3E%3CP%3ESolved%20the%20issue%3B%20turns%20out%2C%20certain%20cmdlets%2C%20such%20as%20%3CSTRONG%3EGet-MailboxDatabase%20%7C%20Get-MailboxStatistics%3C%2FSTRONG%3E%20can%20only%20be%20ran%20from%20an%20Exchange%20Server%20in%20the%20Shell.%20I%20perform%20nearly%20every%20Exchange%20mgmt%20task%20from%20my%20own%20machine%20via%20Remote%20Session.%20(%3CSTRONG%3E%24ExchSession%20%3D%20New-PSSession%3C%2FSTRONG%3E....%20%3CSTRONG%3EImport-PSSession%20%24ExchSession%3C%2FSTRONG%3E...).%20When%20I%20run%20that%20command%20in%20Remote%20Session%2C%20I%20receive%20an%20error%3A%20The%20specified%20mailbox%20%22DB15%22%20doesn't%20exist.%20%5BGet-MailboxStatistics%5D%2C%20ManagementObjectNotFoundException.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20mostly%20followed%20the%20%22%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fexchange%2Fconnect-or-restore-a-deleted-mailbox-exchange-2013-help%23use-the-shell-to-restore-a-deleted-mailbox%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EUse%20the%20Shell%20to%20restore%20a%20deleted%20mailbox%3C%2FA%3E%22%20doc.%3C%2FP%3E%3COL%3E%3CLI%3EFrom%20one%20of%20our%20Exchange%20Servers%2C%20I%20was%20successfully%20able%20to%20run%20this%20cmdlet%3A%3CSTRONG%3E%3CBR%20%2F%3EGet-MailboxDatabase%20%7C%20Get-MailboxStatistics%20%7C%20Where%20%7B%20%24_.DisplayName%20-eq%20%22END%20USER%22%20%7D%3C%2FSTRONG%3E%3C%2FLI%3E%3CLI%3EThis%20returned%20TWO%20entries%2C%20which%20is%20exactly%20what%20I%20expected%20to%20see%3C%2FLI%3E%3CLI%3EI%20piped%20that%20into%20a%20%3CSTRONG%3ESelect%20DisplayName%2CMailboxGuid%2CDatabase%2CServerName%3C%2FSTRONG%3E%20in%20order%20to%20obtain%20the%20original%20mailbox's%20source%20DB%20info%3A%3CBR%20%2F%3E%3CSTRONG%3EGet-MailboxDatabase%20%7C%20Get-MailboxStatistics%20%7C%20Where%20%7B%20%24_.DisplayName%20-eq%20%22END%20USER%22%20%7D%20%7C%26nbsp%3BSelect%20DisplayName%2CMailboxGuid%2CDatabase%2CServerName%3C%2FSTRONG%3E%3C%2FLI%3E%3CLI%3EThis%20enabled%20me%20to%20successfully%20run%20a%20New-MailboxRestoreRequest%3A%3CBR%20%2F%3E%3CSTRONG%3ENew-MailboxRestoreRequest%20-SourceStoreMailbox%20%22GUID%20of%20deleted%20mailbox%22%20-SourceDatabase%20MBXDB01%20-TargetMailbox%20%22END%20USER%20MB%22%20-AllowLegacyDNMismatch%3C%2FSTRONG%3E%3C%2FLI%3E%3CLI%3EUsed%20this%20command%20to%20check%20the%20stats%20of%20the%20restore%3A%3CBR%20%2F%3EG%3CSTRONG%3Eet-MailboxRestoreRequest%20%7C%20Get-MailboxRestoreRequestStatistics%3C%2FSTRONG%3E%3C%2FLI%3E%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-394191%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20to%20Restore%20Deleted%20Mailbox%20with%20a%20twist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-394191%22%20slang%3D%22en-US%22%3EWas%20just%20reading%20about%20the%20Exchange%202016%20Recovery%20Database%20feature.%20Doesn't%20help%20me%20because%20we're%20still%20on%202013.%20%3A)%3C%2Fimg%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Scenario:

  • Exchange 2013
  • User Mailbox was Disabled via EAC
  • AD User object was not disabled or deleted
  • Mailbox shouldn't have been disabled, so they scrambled to fix the situation
  • Instead of Re-connecting old mailbox to the user, a New Mailbox was created for that user
  • The AD User attribute "legacyExchangeDN" appeared to have a different GUID than the current/new mailbox GUID
  • Don't seem to be able to reference the originally deleted mailbox
  • No longer appears in available Soft-Deleted mailboxes
    • The mailbox in question does not appear when I run the following cmdlet
    • Get-MailboxDatabase | Get-MailboxStatistics -Filter 'DisconnectDate -ne $null'
  • Looped through all of our Mailbox DBs, trying to perform a Get-MailboxStatistics -StoreMailboxIdentity GUID, using the former mailbox GUID

Suggested course of action here?

 

Our Commvault system isn't backing up down the mailbox level, just the database. Could I create a new Mailbox Database and restore last night's backup to that database? Then create a move-request from the restore database to the prod DAG?

 

Worst-case scenario, I'll request an Archive Recovery from Mimecast...

2 Replies
Highlighted
Was just reading about the Exchange 2016 Recovery Database feature. Doesn't help me because we're still on 2013. :)
Highlighted
Best Response confirmed by BHSKenHen (New Contributor)
Solution

Solved the issue; turns out, certain cmdlets, such as Get-MailboxDatabase | Get-MailboxStatistics can only be ran from an Exchange Server in the Shell. I perform nearly every Exchange mgmt task from my own machine via Remote Session. ($ExchSession = New-PSSession.... Import-PSSession $ExchSession...). When I run that command in Remote Session, I receive an error: The specified mailbox "DB15" doesn't exist. [Get-MailboxStatistics], ManagementObjectNotFoundException.

 

I mostly followed the "Use the Shell to restore a deleted mailbox" doc.

  1. From one of our Exchange Servers, I was successfully able to run this cmdlet:
    Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisplayName -eq "END USER" }
  2. This returned TWO entries, which is exactly what I expected to see
  3. I piped that into a Select DisplayName,MailboxGuid,Database,ServerName in order to obtain the original mailbox's source DB info:
    Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisplayName -eq "END USER" } | Select DisplayName,MailboxGuid,Database,ServerName
  4. This enabled me to successfully run a New-MailboxRestoreRequest:
    New-MailboxRestoreRequest -SourceStoreMailbox "GUID of deleted mailbox" -SourceDatabase MBXDB01 -TargetMailbox "END USER MB" -AllowLegacyDNMismatch
  5. Used this command to check the stats of the restore:
    Get-MailboxRestoreRequest | Get-MailboxRestoreRequestStatistics