Hello,
The script provided by odsven looks OK, and for now that's probably the only way how you can enable a remote mailbox in Adaxes. We only wanted to warn you that whenever you establish a remote PowerShell session in your script, don't forget to close it when you no longer need it. For example, to close the remote PowerShell session in the above script provided by odsven, you need to add the following line to the very end of the script:
Remove-PSSession $session
If you don't close a session, it will remain hanging in the memory, taking up an extra connection and some resources associated with it.
Also, we are planning to allow enabling remote mailboxes using Adaxes built-in functions in one of our future releases.