Before removing the last Exchange server in the organization we must make sure that all the Exchange databases are removed. We cannot have any mailboxes still active, as they are tied to Active Directory and deleting the server without gracefully delete or disconnect mailboxes would leave the AD with residues of the server and wrong properties all over the place.
1. Check what databases are left and to be removed
Check databases hosted on the last mailbox server
PS C:\> Get-MailboxDatabase -Server MAIL Name Server Recovery ReplicationType ---- ------ -------- --------------- DB01 MAIL False None PS C:\>
Disable Offline Address Book to remove the last arbitration mailbox from the system
PS C:\> Get-OfflineAddressBook | Remove-OfflineAddressBook
Remove mailboxes (only non-arbitration mailboxes!):
PS C:\> Get-Mailbox -Database DB01 | Disable-Mailbox PS C:\> Get-Mailbox -Database DB01 -Archive | Disable-Mailbox -Archive PS C:\> Get-Mailbox -Database DB01 -PublicFolder | Disable-Mailbox -PublicFolder PS C:\> Get-Mailbox -Database DB01 -AuditLog | Disable-Mailbox PS C:\> Get-Mailbox -Database DB01 -Arbitration | Disable-Mailbox -Arbitration -DisableLastArbitrationMailboxAllowed
When done, remove the last database:
PS C:\> Remove-MailboxDatabase DB01
Demote Mailbox Server
Use appwiz.cpl to locate Exchange in the software deployment list and proceed with the uninstallation.
Comments