This is because the
Remove action deletes both the mailbox and the AD object. To correctly remove an Exchange mailbox,
use the Disable action. Figure 8 - 2 shows this with PowerShell.
Figure 8-2
To remove both the AD account and the Exchange account, use the Remove-Mailbox cmdlet:
Remove-Mailbox -Identity < MailboxIdParameter > [-DomainController < Fqdn > ]
[-Permanent < $true | $false > ] [ < CommonParameters > ]
Remove-Mailbox -Database < DatabaseIdParameter > -StoreMailboxIdentity
< Store MailboxIdParameter > [-DomainController < Fqdn > ] [ < CommonParameters > ]
To remove just the Exchange mailbox and not delete the AD account, use the Disable-Mailbox cmdlet:
Disable-Mailbox -Identity < MailboxIdParameter > [-DomainController < Fqdn > ]
[ < CommonParameters > ]
When a mailbox is deleted, it is not really gone; it becomes tombstoned, creating a disconnected mailbox.
This allows for recovery from accidental deletions without having to restore from backup. The default
setting for the mailbox recovery tombstone period is 30 days. However, if the Permanent parameter is
set to true in the Remove-Mailbox cmdlet, the mailbox will not tombstone and will not be recoverable
without going to backup media.
Part II: Working with Server Roles
224
To find all disconnected mailboxes, type the following expression:
Get-MailboxStatistics [-Database < DatabaseIDParameter > ] | where {$_.
Pages:
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330