0 votes

Hi

We have Exchange set up in hybrid mode and are currently using scripts to create the remote mailbox. We're looking to enable Adaxes to do this (from here) but before we do I just wanted to check that rooms and shared mailboxes will be correctly identified and created as such, or if there's anything special we need to do in order to get this to work?

Thanks

Matt

by (2.0k points)

1 Answer

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

Hello Matt,

The main point is that there is no possibility to directly create shared or room mailboxes in Exchange Online. You can only first create a regular mailbox and then convert it to the necessary type. The other approach is to use a script to enable a remote mailbox of the required type in Exchange on-premises and then wait for the synchronization to be completed. The article you referenced shows how to configure automatic enabling and disabling remote mailboxes when a Microsoft 365 license with access to Exchange Online is assigned. As such, the automation will not work for the second approach. As of now, using a script to directly enable a remote mailbox and wait for the synchronization is the easiest approach. In the script, you can use method $Context.EnableRemoteMailboxEx2. For details about the method, see https://adaxes.com/sdk/IAdmExchangeRemoteMailboxOps3.

0

Thanks for the reply. I'll take a look at the EnableRemoteMailbox funtion :)

0

Hi

I've tried the following $Context.EnableRemoteMailboxEx2($remoteRoutingAddress,$mailNickName,$False,$False,$False,$False,$NULL,$emailAddress)

But I get the following error

Method invocation failed because [Softerra.Adaxes.Adsi.Scripting.ExecuteScriptContext] does not contain a method named 'EnableRemoteMailboxEx2'. Stack trace: at <ScriptBlock>, <No file>: line 58

We're running Adaxes 3.14.19312.0 which from what I can see is the latest version, am I missing something or does this need to be done differently?

Thanks

Matt

+1

Hello Matt,

The thing is that the method is not supported by the $Context variable itself. You need to call the methd for a user. For example, to execute the method for the target user the script should look like the following:

$Context.TargetObject.EnableRemoteMailboxEx2($remoteRoutingAddress,$mailNickName,$False,$False,$False,$False,$NULL,$emailAddress)

0

Thank you, that's worked.

One last related question if I can please, is it possible to use one of your methods under $context.targetobject to set the email address policy and add an additional email address to a remote mailbox? I can see this can be done on a full mailbox (https://adaxes.com/sdk/SampleScripts.ModifyingMailboxProperties.EMailAddresses/) but this doesn't seem to be working for me on a remote mailbox using the script example on that page.

0

Hello,

Unfortunately, it is not possible to enable a remote mailbox and set Exchange properties for it in the same script. It has to first be enabled, then synchronized to Exchange Online and only then you can perform the updates. The updates themselves can be performed in a scheduled task with the help of the Modify Exchange properties action. For details about it, have a look at the following tutorial: https://www.adaxes.com/tutorials_AutomatingDailyTasks_AutomateExchangeMailboxConfiguration.htm.

Related questions

0 votes
1 answer

I'd like some help with a script to revoke a users rights to a shared mailbox upon being removed from a security group. I already have the reverse, a script that adds users to a shared mailbox, if they are a member of a group, now I just need the reverse.

asked Mar 20 by dominik.stawny (160 points)
0 votes
1 answer

I tried searching and looking through the script repo but I coun't find what I was looking for. Is there a script I can use with "If PowerShell scripts returns true" ... want to run a scheduled job only on mailboxes that are NOT Shared Mailboxes. Thank you,

asked Sep 26, 2022 by hgletifer (1.3k points)
0 votes
1 answer

Hi, we are running Adaxes in hybrid setup and on-prem as O365 is connected. My business rules looks like this Based on articles I have read here, the local mailbox should ... with a mailbox size of 2GB. Onprem: Online: Anything I am missing or misunderstood?

asked Jul 17, 2023 by wintec01 (1.1k points)
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

We have a "Create Shared Mailbox" function which uses a custom command in PS. I've amended my PS script to created Shared Mailboxes to be inline with the V3 of Exchange ... issue? Here's the script And here's the error after using the the function once.

asked Jun 13, 2023 by Homelander90 (330 points)
3,326 questions
3,026 answers
7,727 comments
544,678 users