How did you migrate the mailboxes to Exchange Online? Hybrid migration?
If yes, you also need to confirm whether you need directory synchronization or password synchronization or ADFS.
There may be 3 scenarios:
- Currently, if you keep an Exchange server running just for recipient management, you may be able to shut down your last Exchange server and manage recipients using Windows PowerShell. For more information, see Manage recipients in Exchange Hybrid environments using Management tools.
- All of the users will be managed in Microsoft 365 or Office 365, and there are no other directory synchronization requirements, you can safely disable directory synchronization and remove Exchange from the on-premises environment.
- The customer is planning on keeping AD FS, they'll also have to keep directory synchronization since it's a prerequisite. Because of that, they can't fully remove the Exchange servers from the on-premises environment. However, they can decommission most of the Exchange servers, but leave a couple of servers behind for user management. Keep in mind that the servers that are left running can be run on virtual machines since the workload is shifted to Exchange Online.
All the steps for these scenarios you could refer to the following official document:
How and when to decommission your on-premises Exchange servers in a hybrid deployment | Microsoft Learn