Short of the long
I deleted an AD user and their Exch2016 mailbox has not been marked as disconnected.
Long of the short
- I migrated a test user from an old forest to a new forest, and then
migrated their mailbox. I did this following all of the MS
documentation regarding
Prepare-MoveRequest.ps1
and the procedures for ADMT. - User could login and could send and receive mail.
- I was done with that test, so I deleted the user from AD along with a user that had been created within the new forest (rather than migrated).
- Just to make sure things worked as expected, I went back later to check the disconnected mailbox status, and ran into some surprises.
Mailbox Status
Get-MailboxStatistics -Database $d -StoreMailboxIdentity $i | select DisplayName,DisconnectReason,DisconnectDate
At this point, the mailbox belonging to the user who was created in the new forest has a value "Disabled" for "DisconnectReason". The user who was migrated still has $null
Attempted Solution
Update-StoreMailboxState -Database $d -Identity $i
This isn't affecting any change for the migrated user.
Status
Get-ADObject -ldapFilter:"(msDS-LastKnownRDN=*)" -IncludeDeletedObjects -Properties * | select Name,Deleted
The migrated user's mailbox is in a limbo state, where the AD object has been deleted, but the mailbox will not transition to Disconnected status.
Attempted Solution 2
Remove-StoreMailbox -Identity $i -Database $d -MailboxState "Disabled"
Returns Error:
The mailbox 6b7460a9-c25b-4051-94c4-1def02663ef6 isn't disconnected.