Great post explaining how to decomission a legacy Exchange Server.
After mailboxes migration to another server, to a newer version, or to Office365 you might need to decommission an Exchange server running on-premises. This operation needs to be done carefully, and you must absolutely avoid the hard deletion of any object from Active Directory using ADSIEdit or similar tool. Hard deletion from AD could result in attributes populated with Deleted Object references and lead to unexpected behaviours.
Read more at source: http://blogs.technet.com/b/mspfe/archive/2015/08/26/decommissioning-legacy-exchange-servers.aspx