To run the Enable-RemoteMailbox command, you need to make sure the mailbox that you used contained in those permission group:
Then, connect to to Exchange with remote PowerShell, after that, run the Enable-RemoteMailbox command directly.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.