Microsoft Exchange/Office365

ADSIEdit Tool: How to remove Microsoft Exchange Server from Active Directory

Microsoft Exchange Server is Microsoft’s email, calendaring, contact, scheduling, and collaboration platform. Exchange Server 2019 brings a new set of technologies, features, and services to Exchange Server. Its goal is to support people and organizations as their work habits evolve from a communication focus to a collaboration focus. 

For some related content on Active Directory, see the following guides. Active Directory Authentication methods: Kerberos and NTLM, Concept of AD Computer Account, how to create a contact in AD, and for a detailed list of articles on Active Directory, visit the following link. This article describes how to remove Exchange Server from your computer, from the Site; and from Active Directory as well.

Here are some possible reasons why you might want to do this
1. Happens when Exchange server is not properly uninstalled and left some traces (attributes) in Active Directory
2. When it is permanently offline and Exchange should be removed.

Before you remove Exchange Server, regardless of the version you are running, you must disconnect all mailbox-enabled users from the mailboxes running Exchange. Exchange Server cannot be removed when its mailboxes are still mounted.

Method 1. Remove (legacy) Exchange server using ADSIEdit
The method of employing ADSIEdit to remove an Exchange server should be done carefully.

To remove the server open ADSI-Edit and go to configuration, navigate to this path:

CN=Configuration,DC=DOMAIN,DC=LOCAL
CN=Services
CN=Microsoft Exchange
CN=EXCHANGE_ORG
CN=Administrative Groups 

Method 2. How to remove a dead Exchange server from Active Directory

Connect to the domain controller, launch the run dialog (Windows Key + R)

- Type in the command “adsiedit.msc” and then press “OK”
- Right click on the console then “Connect to:”- 
- In the connection dialog select “Well known Naming Context”
- In the drop down menu select “Configuration”
- Expand “CN=Configuration [domain]CN=ServicesCN=Microsoft ExchangeCN=organization]CN=Administrative GroupsCN=Servers”
- Right click on the dead server and pick “Delete”

We also need to delete Database information as well, navigate to

“CN=Configuration [domain]CN=ServicesCN=Microsoft ExchangeCN=[organization]CN=Administrative GroupsCN=Databases”

Expand each item to find which one is related to the old server, then delete it as well.
– Additional steps are as follows

1. Delete Exchange Server installation folder on the server’s hard disk.
——-> Usually, this is located on drive C:|Program Files|MicrosoftExchange Server
2. Also delete the Exchange Back End and Front End websites with the IIS-Manager

3. Delete the Active Directory Users and Computers  in the following container container
- DiscoverySearch Mailbox{GUID}
- Exchange Online-ApplicationAccount
- FederatedEmail.GUID
- Migration.GUID
- SystemMailbox{GUID}
- HealthMailboxGUID

4. Also delete the Registry  key “ExchangeServer” under:HKLMSoftwareMicrosoft and
5. Delete the keys “MSExchange*” under: HKLMCurrentControlSetServices

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session. I welcome you to follow me on Twitter and Facebook.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x