Commands › Exchange Online

Disable-Mailbox

Exchange Online ExchangeOnlineManagement Disable-*

Disable the mailbox of existing users who already have mailboxes. For this cmdlet, a user could also be a public folder mailbox or an InetOrgPerson object. The user account that's associated with the mailbox remains, but it's no longer associated with a mailbox.

Quick start script

# Disable-Mailbox — 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-Mailbox
$before | Format-List

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

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

Syntax — 4 parameter sets

Arbitration

Disable-Mailbox [-Identity] <MailboxIdParameter>
 [-Arbitration]
 [-DisableLastArbitrationMailboxAllowed]
 [-DisableArbitrationMailboxWithOABsAllowed]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-IgnoreDefaultScope]
 [-IgnoreLegalHold]
 [-WhatIf]
 [<CommonParameters>]

Archive

Disable-Mailbox [-Identity] <MailboxIdParameter>
 [-Archive]
 [-PermanentlyDisable]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-IgnoreDefaultScope]
 [-IgnoreLegalHold]
 [-WhatIf]
 [<CommonParameters>]

PublicFolder

Disable-Mailbox [-Identity] <MailboxIdParameter>
 [-Confirm]
 [-PublicFolder]
 [-DomainController <Fqdn>]
 [-IgnoreDefaultScope]
 [-IgnoreLegalHold]
 [-WhatIf]
 [<CommonParameters>]

RemoteArchive

Disable-Mailbox [-Identity] <MailboxIdParameter>
 [-RemoteArchive]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-IgnoreDefaultScope]
 [-IgnoreLegalHold]
 [-WhatIf]
 [<CommonParameters>]

Parameters (13)

ParameterTypeRequiredWhat it controls
-Identity MailboxIdParameter yes The Identity parameter specifies the mailbox that you want to mailbox-disable. You can use any value that uniquely identifies the mailbox. For example:
-Arbitration SwitchParameter This parameter is available only in on-premises Exchange.
-Archive SwitchParameter The Archive switch specifies whether to disconnect the archive mailbox from the associated user. You don't need to specify a value with this switch.
-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.
-DisableArbitrationMailboxWithOABsAllowed SwitchParameter This parameter is available only in on-premises Exchange.
-DisableLastArbitrationMailboxAllowed SwitchParameter This parameter is available only in on-premises Exchange.
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-IgnoreDefaultScope SwitchParameter This parameter is available only in on-premises Exchange.
-IgnoreLegalHold SwitchParameter This parameter is available only in on-premises Exchange.
-PermanentlyDisable SwitchParameter This parameter is available only in the cloud-based service.
-PublicFolder SwitchParameter This parameter is available only in on-premises Exchange.
-RemoteArchive SwitchParameter This parameter is available only in on-premises Exchange.
-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.