0 votes

For some reason our Creating office 365 accounts has been failing to correctly mail-enable the users in our local exchange server - it builds it as a mail user and not as a remote mailbox.

I've attached my business rules for creation in case i'm missing something and also a screenshot of the user getting built wrong.

I did find this command online that if I could add the Exchange powershell commandlets it should force it to work.

Enable-RemoteMailbox %mail% –RemoteRoutingAddress %username%@<domain>.mail.onmicrosoft.com

Am I missing something in my business rule setup?

by (440 points)

1 Answer

0 votes
by (1.8k points)
selected by
Best answer

Hi,

We simply use this script to enable them for remotemailbox in our Exchange while using Office 365.
This was the only way i found it possible to enable remotemailbox, when using the "Establish e-mail address for the user" builtin function for Adaxes i believe it sets it up as a Contact or something, but not as a correct remotemailbox.

$session = New-PSSession -ConfigurationName microsoft.exchange -ConnectionUri http://EXCHANGESERVER.<domain>.com/powershell
Import-PSSession $session -DisableNameChecking

enable-remotemailbox "%username%" -remoteroutingaddress "%username%@<domain>.onmicrosoft.com" -primarysmtpaddress "%mail%"

Creates a powershell session to the exchange server, this requires that you have run Enable-PSRemoting on the Exchange server.
Also added the -DisableNameChecking on the Import-PSSession because it would paste a few warnings about some cmdlets that it couldn't import to the Adaxes Web Interface.

Hope it helps. :)

0

Thanks - I tried that and it seems to be working!

0

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.

0

I caught that myself, as I do a fair amount of PowerShell scripts, so I added it in automatically, but others may not.

I'm assuming not yet, but is there any time-frame for a release version that it might get added in?

0

Hello,

No, no exact time frame yet.

Related questions

0 votes
1 answer

Hello! We have an Business Rule that should enable the remote Mailbox after an User is created but that does not work. The Powershell Script that we have in an Custom Command does ... now. What can i do to make it work like we intend to? Thanks in advance!

asked Jun 21, 2023 by eww ag (140 points)
0 votes
1 answer

Is there no "mail enable" action for contacts by default? I was able to create a button but I was suprised there wasn't one already built-in.

asked Aug 28, 2020 by ComputerHabit (790 points)
0 votes
1 answer

Hi guys, I trying to get working the powershell SDK for mail-enabling newly created contact. I use the SDK I found for this method but it doesn ... " # External e-mail address type $user.MailEnable($alias, $externalMailAddress, $externalMailAddressType, $NULL)

asked May 26, 2014 by Masterkic (40 points)
0 votes
1 answer

Hi, How to set up Business Rule to automatically mail-enable new groups?

asked Sep 16, 2011 by bambor (40 points)
0 votes
0 answers

When attempting to assign licenses during the "after creating a user" rule we're reciving the following error. Failed to create a remote mailbox for the user. The address ' ... mail attribute to the proper format that isn't the onmicrosoft.com domain as well.

asked Sep 2, 2021 by zorps (20 points)
3,351 questions
3,052 answers
7,793 comments
545,113 users