Completely remove exchange 2013

The need to completely remove Exchange can have many reasons, I for one went through this exercise in my  lab recently, and while it should be the last hope it is technically possible and the process is relatively easy too.

To completely remove Exchange from your forest open ADSIEdit and connect to the configuration node:

ADSIESIT

Navigate to the CN=Configuration=, DC=YourDomain, DC=Name and then to Services and delete the Exchange and Autodiscover nodes :

ADSIEDIT Services

Next connect to the Default Naming Context which will be DC=YourDomain,DC=Name and delete the Microsoft Exchange Security Groups and Microsoft Exchange System Objects containers:

ADSI_Domain

 

The last step would be removing the various users that are created as part of the Exchange installation, these users will vary from installation to installation but can be summarized as follows:

DiscoverySearch Mailbox{GUID}
Exchange Online-ApplicationAccount
FederatedEmail.GUID
Migration.GUID
*SystemMailbox{GUID}
*HealthMailboxGUID

Remove_Mailboxes

If you already removed the servers on which Exchange was installed, or where the installation failed, you are good to go if you still need to cleanup data on the Exchange servers there is still some work you need to do which I’ve summarized below.

Exchange server disk

Completely remove the installation directory (by default C:Program FilesMicrosoftExchange Server)

Exchange server registry

Remove the ExchangeServer key which can be found under HKLMSoftwareMicrosoft

Remove-Item -Path HKLM:SoftwareMicrosoftExchangeServer

And the MSExchange key which can be found under HKLMCurrentControlSetServices

Remove-Item -Path HKLM:CurrentControlSetServicesMSExchange

Exchange server IIS

From II Manager you will need to delete the two sites BackEnd and FrontEnd  websites .

That’s it once you’ve deleted all the above data all references to the Exchange organization will be removed form your Active Directory deployment and you can proceed with a fresh Exchange installation.

Advertisements

2 thoughts on “Completely remove exchange 2013

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