Remove Exchange Server using ADSI Edit

What is ADSIEdit?

Active Directory Service Interfaces Editor is a Lightweight Directory Access Protocol editor that you can use to manage objects and attributes in Active Directory. It provides a detailed view of every object and attribute in your Active Directory forest. You can query, view and modify attributes using ADSIEdit.

Important: ADSI Edit must be handled with care. Modifying the attributes using ADSIEdit can cause significant issues with your infrastructure if something is done in a wrong way.

When to use ADSI Edit for Exchange?

I usually don’t recommend to use ADSI Edit for exchange related tasks but sometime I’ve seen scanerios where the only solution that is available for us is to use ADSIEdit to clean and fix Exchange issues. Few of these scanerio’s are as below.

  • Removing Exchange Server Attributes for old decommissioning of Exchange
  • Exchange Server is offline and needs to be removed from Active Directory
  • Exchange installation did not finish properly and attributes need to be removed
  • Removed Public Folder Database attributes
  • Remove other Exchange attributes related to Database or services

How to remove Exchange Server using ADSI Edit?

Follow the following steps to remove Exchange Server using ADSI Edit.

  • Login to domain controller with administrative account.
  • Navigate to Start –> Run –> ADSIEdit.msc and hit enter
  • Click on Action –> Connect to –> Select Configuration under “Select a well known naming Context:”

1

  • Navigate to CN=Configuration, DC=MSCloudTalks, DC=COM

Replace DC=MSCloudTalks, DC=COM with your domain name

  • Expand the CN=Services –> CN=Microsoft Exchange

2

 

If your exchange server is permanently offline and you do not want to bring it online again, then simply remove CN=Microsoft Exchange and CN=Microsoft Exchange Autodiscover

  • If you want to remove a specific Exchange server which wasn’t installed or uninstalled properly then navigate to CN=Microsoft Exchange >CN=CloudTalks>CN=Administrative Groups>CN=Exchange Administrative Group(FYD12345789)>CN=Servers

3

 

  • Select the Exchange Server from right hand side and delete the server.
  • Once the server is deleted from ADSI Edit, Update the Schema and run AD Replication.
  • Reinstall the operating system on deleted Exchange server and use the hardware the other services.

Conclusion

Sometimes We came across scenarios where the only solution is to use ADSI Edit to completely remove Exchange server from Active Directory domain but using the ADSI tool can be harmful in a way that if you delete a wrong server by mistake then the impact will be on all users using the service. Also, I do not recommend to use ADSI Edit in first go. You always have ADSI workaround as last resort to remove Exchange server and attributes from Active Directory Domain. Also, make sure you have a full back up of you AD and Exchange infrastructure before removing anything from ADSI Edit.