Remove the Exchange 2013 Mailbox role and Exchange from your 2012 server

 

Id done this a few times and sometimes I can remember the sequence and sometimes I would forget. There are serious consequences to forgetting.  It takes forever to go back and keep running the removal and fail. The client access role will remove fairly smoothly. The mail role requires that every object be addressed before the role will come out successfully. Below find the steps to get the mail role and Exchange decomissioned from your server. Once this is completed, go to AD and remove all evidence of Exchange in your ADUC. delete all the security groups, folders, , monitoring and system guids, etc… then you can remove any IIS app pools , folders entries, and registry evidence of Exchange if desired. Reboot your System and begin with Prepare Schema again.

Remove Mailbox Role Exchange 2013

1. Get-user | disable-mailbox
2. Get-PartnerApplication| Remove-PartnerApplication
3. Get-mailboxdatabase
4. Use 3 to run- Get-Mailbox -Arbitration -Database ‘Mailbox Database xxxxxxxxxx’ | Disable-Mailbox -Arbitration
-DisableLastArbitrationMailboxAllowed
5. Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisconnectReason -eq “Disabled” } | ft  DisplayName,Database,DisconnectDate
6. Get-Mailbox -Monitoring | Disable-Mailbox
7.>Get-MailboxDatabase | Remove-MailboxDatabase
8. See that database is now deleted with  – Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisconnectReason -eq “Disabled” } | ft  DisplayName,Database,DisconnectDate
9. Physically delete the database and log files (leave the mailbox folder for now)
10. verify nothing is left – Get-MailboxStatistics -Database ‘Mailbox Database 0039199658’ | where {$_.DisconnectReason -eq “SoftDeleted”} |foreach {Remove-StoreMailbox -Database $_.database -Identity $_.mailboxguid -MailboxState SoftDeleted}
11. get-mailbox
12 get-mailbox -arbitration
13. get-mailbox -monitoring

At this point reboot the server and verify that IIS and other roles are working correctly. As an extreme measure, you may also remove the prerequisites and reinstall them. (http://technet.microsoft.com/en-us/library/bb691354(v=exchg.150).aspx)

Finally, begin again-
14 cmd -> Setup /Mode:Uninstall /iacceptexchangeserverlicenseterms

Advertisements

4 thoughts on “Remove the Exchange 2013 Mailbox role and Exchange from your 2012 server

  1. Used this today- last step is out of line
    setup /m:uninstall /iacceptexchangeserverlicenseterms

    Like

  2. […] after some googling, I found the commands to successfully remove Exchange 2013 thanks to this blog post: 1. Get-user | disable-mailbox 2. Get-PartnerApplication| Remove-PartnerApplication 3. […]

    Like

  3. Mark Shearar says:

    Thanks for this brilliant guide. I ran into an issue where the HealthMailboxes were preventing step 7. Couldn’t delete as I kept getting a permissions error even though I was logged in as domain admin. Found the “Monitoring Mailboxes” OU had a deny “delete subtree” entry under advanced permissions for “Exchange Servers”. I removed that and was able to delete those mailboxes and then the actual databases.

    Like

  4. Danilo says:

    Thankyou very much …. very ussefull step by step How to remove Mailbox 🙂

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s