To Detach or Disconnect a Exchange Mailbox from a user account use Disable-Mailbox in powershell. This removes the exchange attributes from the user account in Active Directory.
To reattach the mailbox to another user account use Connect-Mailbox
You can also permanently delete a disconnected mailbox at any time by using the Remove-Mailbox cmdlet in the Exchange Management Shell
Use the Clean-MailboxDatabase cmdlet to scan the Active Directory directory service for disconnected mailboxes that are not yet marked as disconnected in the Microsoft Exchange store and update the status of those mailboxes in the Exchange store