How to remove old Exchange server from Active Directory

Share this post on:

Phase 1 : Verify mailbox database in Old Exchange server

Note : Always take an Ad-Hoc backup of your Domain Controller before making any changes to your schema. In this case, i need to delete this Exchange server : 

Get-ExchangeServer | ft -a

  • TDCEXCAS01
  • TDCEXCAS02
  • TDCEXMBX01

To verify any mailbox is exchange server, i will run this command : 

for TDCEXCAS01 Server : 

Get-Mailbox -Monitoring | ?{$_.DisplayName -like "*TDCEXCAS01*"} | Format-Table Name, Database, DisplayName, ServerName

For TDCEXCAS02 Server : 

Get-Mailbox -Monitoring | ?{$_.DisplayName -like "*TDCEXCAS02*"} | Format-Table Name, Database, DisplayName, ServerName

For TDCEXMBX01 Server : 

Get-Mailbox -Monitoring | ?{$_.DisplayName -like "*TDCEXMBX01*"} | Format-Table Name, Database, DisplayName, ServerName

In this case, all mailbox has been transferred to another New exchange server. If still have active mailbox, you need to migrate mailbox database before proceed Phase 2

 

Phase 2 : To completely remove a failed Exchange Server from the Schema:

 

  • Right-click on ADSIEDITand click on Connect to…
  • Change the Select a well-known Naming Context from Default Naming Context to Configuration.
  • Open ADSI >
  • Click Configuration >
  • CN=Configuration,DC=TDC,DC=[your_DC_name],DC=ORG >
  • CN=Services >
  • CN=Microsoft Exchange >
  • CN=[number] >
  • CN=Administrator Group >
  • CN=Exchange Administrator Group (Code) >
  • CN=Servers >
  • To delete the server from the configuration, right-click and click delete on TDCEXCAS01, TDCEXCAS02 and TDCEXMBX01 

Phase 3 : Delete Mailbox Database 

Now, there are other things which might be pointing to that server, like databases, which you need to remove from the configuration also.

Databases can be found under CN=Databases. The databases which have their entry with CN= would need to be removed.

  • CN=Exchange Administrator Group (Code) >
  • CN=Database >
  • CN=Archive Database >

Remove database with related with TDCEXCAS01, TDCEXCAS02 and TDCEXMBX01 ONLY. 

Phase 4 : Delete Old Exchange server in Active directory User and Computers

To remove the server from the Active Directory groups, follow these steps:

  • Open the Active Directory Users and Computers
  • Double-click on the Exchange Server Security Group.
  • Click on Members.
  • Click on the server’s name you need remove and click Remove.

Now, the last step is to remove the computer account. For this,

  • Click on the Search button.
  • Change the Find to Computers.
  • Enter the server name under the Computer name dialog box and click Find.
  • Right-click on the server and click on Delete.

Once finish all this step, recommanded to run gpupdate /force via command prompt

Loading