Last year I set up 2012 AD and Exchange 2013 for testing in my home lab (Citrix XenServer 6.2 on i7-950, 12GB DDR3, Rocketraid 3510). Fast forward to this year where I remembered Exchange 2013 Service Pack 1 is finally supported on Server 2012 R2. I wanted to do a clean install of Exchange Service Pack 1 onto a Server 2012 R2 VM in my AD environment, so I needed to uninstall Exchange 2013 first. However, removing Exchange isn’t as simple and going to Add/Remove Programs. If you do that first without anything else, you will get a wall of text like the one below:
Fortunately after some googling, I found the commands to successfully remove Exchange 2013 thanks to this blog post:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Get-user | disable-mailbox Get-PartnerApplication| Remove-PartnerApplication Get-mailboxdatabase Use 3 to run- Get-Mailbox -Arbitration -Database ‘Mailbox Database xxxxxxxxxx’ | Disable-Mailbox -Arbitration -DisableLastArbitrationMailboxAllowed Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisconnectReason -eq “Disabled” } | ft DisplayName,Database,DisconnectDate Get-Mailbox -Monitoring | Disable-Mailbox Get-MailboxDatabase | Remove-MailboxDatabase See that database is now deleted with – Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisconnectReason -eq “Disabled” } | ft DisplayName,Database,DisconnectDate Physically delete the database and log files (leave the mailbox folder for now) verify nothing is left – Get-MailboxStatistics -Database ‘Mailbox Database 0039199658′ | where {$_.DisconnectReason -eq “SoftDeleted”} |foreach {Remove-StoreMailbox -Database $_.database -Identity $_.mailboxguid -MailboxState SoftDeleted} get-mailbox get-mailbox -arbitration get-mailbox -monitoring |
Now you can uninstall Exchange 2013 from Add/Remove Programs.