Commands › Exchange Online

Set-SiteMailbox

Exchange Online ExchangeOnlineManagement Set-*

Change a site mailbox's settings, such as the Microsoft SharePoint URL. This cmdlet is primarily used by the SharePoint and Microsoft Exchange user interfaces, such as the SharePoint URL. This cmdlet should only be used for diagnostic and troubleshooting purposes. Site mailboxes were deprecated in Exchange Online and SharePoint Online in 2017. For more information, see Deprecation of Site Mailboxes.

Quick start script

# Set-SiteMailbox — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-SiteMailbox
$before | Format-List

# 3. Make the change (dry run first)
Set-SiteMailbox -Identity <RecipientIdParameter> -WhatIf
Set-SiteMailbox -Identity <RecipientIdParameter>

# 4. Verify and diff
$after = Get-SiteMailbox
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-SiteMailbox [-Identity] <RecipientIdParameter>
 [-Active <Boolean>]
 [-Confirm]
 [-DisplayName <String>]
 [-DomainController <Fqdn>]
 [-Force]
 [-Members <RecipientIdParameter[]>]
 [-Owners <RecipientIdParameter[]>]
 [-RemoveDuplicateMessages <Boolean>]
 [-SharePointUrl <Uri>]
 [-ShowInMyClient <Boolean>]
 [-SyncEnabled <Boolean>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (13)

ParameterTypeRequiredWhat it controls
-Identity RecipientIdParameter yes The Identity parameter specifies the identity of the site mailbox. You can use any value that uniquely identifies the site mailbox. For example:
-Active Boolean The Active parameter specifies whether to change the site mailbox's lifecycle status. This parameter accepts $true or $false. This parameter is intended for use only by the user interface. We recommend that you don't...
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-DisplayName String The DisplayName parameter specifies the display name of the site mailbox.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-Force SwitchParameter The Force switch hides warning or confirmation messages. You don't need to specify a value with this switch.
-Members RecipientIdParameter[] This parameter is intended for use only by the user interface. We recommend that you don't use this parameter.
-Owners RecipientIdParameter[] This parameter is intended for use only by the user interface. We recommend that you don't use this parameter.
-RemoveDuplicateMessages Boolean The RemoveDuplicateMessages parameter specifies that when users post messages to a site mailbox, duplicate messages are deleted. This parameter accepts the values of $true or $false. The default value is $false.
-SharePointUrl Uri The SharePointUrl parameter specifies the URL of the SharePoint site, for example, "https://myserver/teams/edu".
-ShowInMyClient Boolean This parameter is intended for use only by the user interface. We recommend that you don't use this parameter.
-SyncEnabled Boolean The SyncEnabled parameter specifies whether to enable or disable synchronization for the site mailbox. Valid values are:
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.