Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Why shared mailboxes?

...

To create a new mailbox, please use the code below and customize it to your needs (email address, etc). Afterwards, please add it in the "Shared Mailbox" section of the "Office Settings" menu in Confluence settings, using the email address.


# ----
# Please make sure to execute the following code in an elevated powershell session
# ----
#
# Check if we have the necessary execution policy set to execute remote signed scripts (from Office365)
Get-ExecutionPolicy

# If it's not Unrestricted, AllSigned or RemoteSigned, please do:
Set-ExecutionPolicy RemoteSigned

# Start new Exchange powershell session with Office 365 - you'll need to be Office 365 administrator to do this
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

# Import all existing Cmdlets from Office 365
Import-PSSession $Session

# Create a new shared mailbox with the name "Confluence Calendars" and the alias "confluence"
# This will result in a new mailbox with the SMTP address confluence@yourdomain.com
New-Mailbox -Shared -Name "Confluence Calendars" -DisplayName "Confluence Calendars" -Alias confluence

# Give all users in your organisation (S-1-1-0) full access to the mailbox. If you want to limit the access to certain groups,
# it's also possible to provide a distribution group or single user for the -User parameter. To avoid having the shared mailbox
# added to Outlook automatically, please make sure to leave -AutoMapping on $false.
Add-MailboxPermission -Identity confluence -User S-1-1-0 -AccessRights FullAccess -AutoMapping $false -InheritanceType All