Commands › Exchange Online

Set-CASMailbox

Exchange Online ExchangeOnlineManagement Set-*

Configure client access settings on a mailbox. For example, you can configure settings for Exchange ActiveSync, Outlook, Outlook on the web, POP3, and IMAP4.

Quick start script

# Set-CASMailbox — 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-CASMailbox
$before | Format-List

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

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

Syntax

Set-CASMailbox [-Identity] <MailboxIdParameter>
 [-ActiveSyncAllowedDeviceIDs <MultiValuedProperty>]
 [-ActiveSyncBlockedDeviceIDs <MultiValuedProperty>]
 [-ActiveSyncDebugLogging <Boolean>]
 [-ActiveSyncEnabled <Boolean>]
 [-ActiveSyncMailboxPolicy <MailboxPolicyIdParameter>]
 [-ActiveSyncSuppressReadReceipt <Boolean>]
 [-Confirm]
 [-DisplayName <String>]
 [-DomainController <Fqdn>]
 [-ECPEnabled <Boolean>]
 [-EmailAddresses <ProxyAddressCollection>]
 [-EwsAllowEntourage <Boolean>]
 [-EwsAllowList <MultiValuedProperty>]
 [-EwsAllowMacOutlook <Boolean>]
 [-EwsAllowOutlook <Boolean>]
 [-EwsApplicationAccessPolicy <EwsApplicationAccessPolicy>]
 [-EwsBlockList <MultiValuedProperty>]
 [-EwsEnabled <Boolean>]
 [-HasActiveSyncDevicePartnership <Boolean>]
 [-IgnoreDefaultScope]
 [-ImapEnabled <Boolean>]
 [-ImapEnableExactRFC822Size <Boolean>]
 [-ImapMessagesRetrievalMimeFormat <MimeTextFormat>]
 [-ImapForceICalForCalendarRetrievalOption <Boolean>]
 [-ImapSuppressReadReceipt <Boolean>]
 [-ImapUseProtocolDefaults <Boolean>]
 [-IsOptimizedForAccessibility <Boolean>]
 [-MacOutlookEnabled <Boolean>]
 [-MAPIBlockOutlookExternalConnectivity <Boolean>]
 [-MAPIBlockOutlookNonCachedMode <Boolean>]
 [-MAPIBlockOutlookRpcHttp <Boolean>]
 [-MAPIBlockOutlookVersions <String>]
 [-MAPIEnabled <Boolean>]
 [-MapiHttpEnabled <Boolean>]
 [-Name <String>]
 [-OneWinNativeOutlookEnabled <System.Boolean>]
 [-OutlookMobileEnabled <Boolean>]
 [-OWAEnabled <Boolean>]
 [-OWAforDevicesEnabled <Boolean>]
 [-OwaMailboxPolicy <MailboxPolicyIdParameter>]
 [-PopEnabled <Boolean>]
 [-PopEnableExactRFC822Size <Boolean>]
 [-PopForceICalForCalendarRetrievalOption <Boolean>]
 [-PopMessagesRetrievalMimeFormat <MimeTextFormat>]
 [-PopSuppressReadReceipt <Boolean>]
 [-PopUseProtocolDefaults <Boolean>]
 [-PrimarySmtpAddress <SmtpAddress>]
 [-PublicFolderClientAccess <Boolean>]
 [-ResetAutoBlockedDevices]
 [-SamAccountName <String>]
 [-ShowGalAsDefaultView <Boolean>]
 [-SmtpClientAuthenticationDisabled <Boolean>]
 [-UniversalOutlookEnabled <Boolean>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (55)

ParameterTypeRequiredWhat it controls
-Identity MailboxIdParameter yes The Identity parameter specifies the mailbox that you want to configure. You can use any value that uniquely identifies the mailbox. For example:
-ActiveSyncAllowedDeviceIDs MultiValuedProperty TheActiveSyncAllowedDeviceIDs parameter specifies one or more Exchange ActiveSync device IDs that are allowed to synchronize with the mailbox. A device ID is a text string that uniquely identifies the device. Use the...
-ActiveSyncBlockedDeviceIDs MultiValuedProperty The ActiveSyncBlockedDeviceIDs parameter specifies one or more Exchange ActiveSync device IDs that aren't allowed to synchronize with the mailbox. A device ID is a text string that uniquely identifies the device. Use...
-ActiveSyncDebugLogging Boolean The ActiveSyncDebugLogging parameter enables or disables Exchange ActiveSync debug logging for the mailbox. Valid values are:
-ActiveSyncEnabled Boolean The ActiveSyncEnabled parameter enables or disables access to the mailbox using Exchange ActiveSync. Valid values are:
-ActiveSyncMailboxPolicy MailboxPolicyIdParameter The ActiveSyncMailboxPolicy parameter specifies the Exchange ActiveSync mailbox policy for the mailbox. You can use any value that uniquely identifies the Exchange ActiveSync mailbox policy. For example:
-ActiveSyncSuppressReadReceipt Boolean The ActiveSyncSuppressReadReceipt parameter controls the behavior of read receipts for Exchange ActiveSync clients that access the mailbox. Valid values are:
-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 This parameter is available only in on-premises Exchange.
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-ECPEnabled Boolean This parameter is available only in on-premises Exchange.
-EmailAddresses ProxyAddressCollection This parameter is available only in on-premises Exchange.
-EwsAllowEntourage Boolean The EwsAllowEntourage parameter enables or disables access to the mailbox by Microsoft Entourage clients that use Exchange Web Services (for example, Entourage 2008 for Mac, Web Services Edition).
-EwsAllowList MultiValuedProperty The EwsAllowList parameter specifies the Exchange Web Services applications (user agent strings) that are allowed to access the mailbox.
-EwsAllowMacOutlook Boolean The EwsAllowMacOutlook parameter enables or disables access to the mailbox by Outlook for Mac clients that use Exchange Web Services (for example, Outlook for Mac 2011 or later). Valid values are:
-EwsAllowOutlook Boolean The EwsAllowOutlook parameter enables or disables access to the mailbox by Outlook clients that use Exchange Web Services. Outlook uses Exchange Web Services for free/busy, out-of-office settings, and calendar...
-EwsApplicationAccessPolicy EwsApplicationAccessPolicy The EwsApplicationAccessPolicy parameter controls access to the mailbox using Exchange Web Services applications.
-EwsBlockList MultiValuedProperty The EwsBlockList parameter specifies the Exchange Web Services applications (user agent strings) that aren't allowed to access the mailbox using Exchange Web Services.
-EwsEnabled Boolean The EwsEnabled parameter enables or disables access to the mailbox using Exchange Web Services clients. Valid values are:
-HasActiveSyncDevicePartnership Boolean The HasActiveSyncDevicePartnership parameter specifies whether the mailbox has an Exchange ActiveSync device partnership established. Valid values are:
-IgnoreDefaultScope SwitchParameter This parameter is available only in on-premises Exchange.
-ImapEnabled Boolean The ImapEnabled parameter enables or disables access to the mailbox using IMAP4 clients. Valid values are:
-ImapEnableExactRFC822Size Boolean This parameter is available only in on-premises Exchange.
-ImapForceICalForCalendarRetrievalOption Boolean The ImapForceICalForCalendarRetrievalOption parameter specifies how meeting requests are presented to IMAP4 clients that access the mailbox. Valid values are:
-ImapMessagesRetrievalMimeFormat MimeTextFormat The ImapMessagesRetrievalMimeFormat parameter specifies the message format for IMAP4 clients that access the mailbox. You can use an integer or a text value. Valid values are:
-ImapSuppressReadReceipt Boolean The ImapSuppressReadReceipt parameter controls the behavior of read receipts for IMAP4 clients that access the mailbox. Valid values are:
-ImapUseProtocolDefaults Boolean The ImapUseProtocolDefaults parameter specifies whether to use the IMAP4 protocol defaults for the mailbox. Valid values are:
-IsOptimizedForAccessibility Boolean This parameter is functional only in on-premises Exchange.
-MacOutlookEnabled Boolean This parameter is available only in the cloud-based service.
-MAPIBlockOutlookNonCachedMode Boolean This parameter is available only in on-premises Exchange.
-MAPIBlockOutlookExternalConnectivity Boolean This parameter is available only in on-premises Exchange.
-MAPIBlockOutlookRpcHttp Boolean This parameter is available only in on-premises Exchange.
-MAPIBlockOutlookVersions String This parameter is available only in on-premises Exchange.
-MAPIEnabled Boolean The MAPIEnabled parameter enables or disables access to the mailbox using MAPI clients (for example, Outlook). Valid values are:
-MapiHttpEnabled Boolean This parameter is available only in on-premises Exchange.
-Name String This parameter is available only in on-premises Exchange.
-OneWinNativeOutlookEnabled Boolean This parameter is available only in the cloud-based service.
-OutlookMobileEnabled Boolean This parameter is available only in the cloud-based service.
-OWAEnabled Boolean The OWAEnabled parameter enables or disables access to the mailbox using Outlook on the web (formerly known as Outlook Web App or OWA) and the new Outlook for Windows. Valid values are:
-OWAforDevicesEnabled Boolean The OWAforDevicesEnabled parameter enables or disables access to the mailbox using the older Outlook Web App (OWA) app on iOS and Android devices. Valid values are:
-OwaMailboxPolicy MailboxPolicyIdParameter The OwaMailboxPolicy parameter specifies the Outlook on the web mailbox policy for the mailbox. You can use any value that uniquely identifies the Outlook on the web mailbox policy. For example:
-PopEnabled Boolean The PopEnabled parameter enables or disables access to the mailbox using POP3 clients. Valid values are:
-PopEnableExactRFC822Size Boolean This parameter is available only in on-premises Exchange.
-PopForceICalForCalendarRetrievalOption Boolean The PopForceICalForCalendarRetrievalOption parameter specifies how meeting requests are presented to POP3 clients that access the mailbox. Valid values are:
-PopMessagesRetrievalMimeFormat MimeTextFormat The PopMessagesRetrievalMimeFormat parameter specifies the message format for POP3 clients that access the mailbox. You can use an integer or a text value. Valid values are:
-PopSuppressReadReceipt Boolean The PopSuppressReadReceipt parameter controls the behavior of read receipts for POP3 clients that access the mailbox. Valid values are:
-PopUseProtocolDefaults Boolean The PopUseProtocolDefaults parameter specifies whether to use the POP3 protocol defaults for the mailbox. Valid values are:
-PrimarySmtpAddress SmtpAddress This parameter is available only in on-premises Exchange.
-PublicFolderClientAccess Boolean The PublicFolderClientAccess parameter enables or disables access to public folders in Microsoft Outlook. Valid values are:
-ResetAutoBlockedDevices SwitchParameter This parameter is available only in on-premises Exchange.
-SamAccountName String This parameter is available only in on-premises Exchange.
-ShowGalAsDefaultView Boolean The ShowGalAsDefaultView parameter specifies whether the global address list (GAL) is the default recipient picker for messages. Valid values are:
-SmtpClientAuthenticationDisabled Boolean This parameter is available only in the cloud-based service.
-UniversalOutlookEnabled Boolean This parameter is available only in the cloud-based service.
-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.

Message Center changes mentioning this command

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