Happy New Year everyone, life is short - let’s dream big and make the most of 2022! In the year’s first article, I want to show you how to create shared mailboxes in Microsoft Exchange Online and perform the most common administrative tasks using Powershell. Important: To perform the tasks described below, your user must be a Global admin or belong to the Exchange admin group.
First, you need to ensure the ExchangeOnlineManagement module is installed on your computer and then import it into your Powershell session. To do that, you should use the following commands.
Here we define the basic information of the shared mailbox that we want to create/manage. You should replace <E-MAIL> with the mail you want to assign to the shared mailbox.
$sharedMailboxName="New Department SharedMailbox"$sharedMailboxAlias="NewDepartment"$sharedMailboxEmail="<E-MAIL>"
After the mailbox is created, you need to permit users to use the shared mailbox. Remember that only people within your organization can use a shared mailbox. You should use the Add-MailboxPermission cmdlet with the following syntax to add permissions to the shared mailbox.
SendAs permission allows a user or group member to send messages that appear to come from the specified mailbox. To add SendAs permission to users, you should use the Add-RecipientPermission cmdlet with the following syntax.
This section will show you how to carry out shared mailboxes’ most common administration tasks. To perform the following tasks, you should use the Set-Mailbox cmdlet.
if you want to remove users to Send on Behalf permissions for the shared mailbox. Remove= list if a comma-separated list. Each email address should be in double-quoted brackets.
The DeliverToMailboxAndForward parameter determines how messages are delivered and forwarded. $true: Messages are sent to this mailbox and forwarded to the specified email address. $false: Messages are only forwarded to the specified email address. Messages are not delivered to this mailbox.>
The DeliverToMailboxAndForward parameter determines how messages are delivered and forwarded. $true: Messages are sent to this mailbox and forwarded to the specified email address. $false: Messages are only forwarded to the specified email address. Messages are not delivered to this mailbox.
#
To get the address listing for email forwarding, use the following cmdlet.
Copy items sent as this mailbox, or on behalf of this mailbox, to the mailbox’s Sent Items folder. This lets shared mailbox members see the email other members have sent. If you don’t copy sent items to the mailbox, they will only be saved to the sender’s Sent Items folder. You should use the MessageCopyForSendOnBehalfEnabled and MessageCopyForSentAsEnabled parameters to set the desired settings.
You should use the Set-CASMailbox cmdlet to configure client access settings on a mailbox. Using this cmdlet, you can configure settings for Exchange ActiveSync, Outlook, Outlook on the web (OWA), POP3, and IMAP4.
To get the existing mail apps access settings, use the following cmdlet.