Commands › Exchange Online
Disable-Mailbox
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)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.