0 votes

Hi,

I would like to know whether it is possible to modify a shared mailbox after creation with a business rule.

We create the shared mailbox on prem using a custom command with PowerShell, after the creation I want to automatically change a property on the newly created shared mailbox:

set-mailbox <mailbox name> -MessageCopyForSentAsEnabled $True

and

set-mailbox <mailbox name> -MessageCopyForSendOnBehalfEnabled $True

Because I cannot do this during the creation I want to do it after creation using a business rule if possible. But I could not find the correct object type when creating the business rule. I suppose I could use "User" but I don't how to identity the user object type as a shared mailbox.

Thanks,

Thomas Maurer

by (50 points)
0

Hello Thomas,

Please, provide a screenshot of the custom command being used. Also, please, provide all the scripts executed in the command in TXT format. You can post the data here or send to us at support@adaxes.com.

0

Hi Support2,

Below is a snippet of the code:

try
{
    # Connect to Exchange server
    $session = New-PSSession -connectionURI "http://$exchangeServer/powershell" -ConfigurationName Microsoft.Exchange
    Import-PSSession -session $session -AllowClobber -CommandName $commands

$RMBX= new-remotemailbox -OnPremisesOrganizationalUnit $OU -Shared -name $MailboxName -UserPrincipalName $UPN -RemoteRoutingAddress $RRA
$Context.LogMessage("Shared mailbox $MailboxName has $UPN and $RRA ","information"   )
}
finally
{
    # Close the remote session and release resources
    if ($session) { Remove-PSSession -Session $session}
}

The above script is the only script executed in the custom command

1 Answer

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

Hello Thomas,

Thank you for the provided details. First of all, there is no built-in functionality in Adaxes to manage the features in question. Also, the script enables a remote shared mailbox. As such, Set-Mailbox will never work. Also, there is no possibility to enable/disable the features for remote mailboxes. You can check the following article for details: https://learn.microsoft.com/en-us/powershell/module/exchange/set-remotemailbox?view=exchange-ps.

Related questions

0 votes
1 answer

I'm trying to modify mailbox settings to add additional email addresses to a user after creation. This is a hybrid on-prem and Exchange Online with E5 licenses. Everything works up ... to a different OU during the process so I know the user exists. Any ideas?

asked Mar 6, 2023 by Michael Long (70 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)
0 votes
0 answers

We currently convert user mailboxes to shared mailboxes during deprovisioning process but if the user mailbox was already a shared mailbox then the script throws an error ... user mailbox. Here is the actions of the current deprovision command: Thanks!

asked Oct 1 by Carlos (40 points)
0 votes
1 answer

So if we change the flow on the exisitng deprovision script to the above, is there a way to set a retention policy tag to the converted mailbox? Our standard retention is 90 days.

asked Sep 19 by EnbyAdmin (60 points)
0 votes
1 answer

I am looking for a solution to recognize in advance when the storage space of a shared mailbox is full and then a mail is sent Unfortunately, the report under ... -Encoding UTF8 Is there possibly a solution to query this automatically via Adaxes? Thanks!

asked Sep 13 by boris (530 points)
3,574 questions
3,263 answers
8,282 comments
548,008 users