Exchange – Disable access for a mailbox

Sometimes, it can be usefull to disable access to the Exchange server for a specific mailbox. For exemple, in order to forbid Outlook Web App (Outlook on the Web for Exchange 2016) but you do not want to disable the user account. Or you can prestage the mailbox and only allow access to a specific date/ time.

This can also be used during a migration to another mail system: when the user is migrated, you can disable all access to force the user on the new messaging system. And prevent any email sent by the old Exchange.

Exchange Disable access

Exchange Disable access

Let’s see how to disable all access for a mailbox using ECP or Exchange Powershell:

Disable Access using ECP

You can disable access by the Exchange Control Panel:

  • On the Recipients tab, go to the mailbox and select Edit:
Edit Mailbox

Edit Mailbox

  • Go to the Mailbox features tab, and disable all access that will be forbidden:
Disable Features

Disable Features

Using Exchange Powershell

It also possible to use Exchange Powershell. Moreover, with Powershell, we have one more option available: Disable EWS access.

All parameters availables are:

  • ActiveSyncEnabled : Remove access for ActiveSync.
  • ImapEnabled : Remove access for IMAP.
  • EwsEnabled : Remove access for Exchange Web Service.
  • MAPIEnabled : Remove access for Outlook.
  • OWAEnabled : Remove access for Outlook Web App.
  • PopEnabled : Remove access for POP.
  • OWAforDevicesEnabled : Remove access for OWA App (IOS, etc.)

You can use one command line to disable all access for the mailbox:

Set-CASMailbox USER -ActiveSyncEnabled $false -ImapEnabled $false -EwsEnabled $false -MAPIEnabled $false -OWAEnabled $false -PopEnabled $false -OWAforDevicesEnabled $false
Powershell Disable All Access

Powershell Disable All Access

Or, if you want to re-enable all features:

Set-CASMailbox USER -ActiveSyncEnabled $true -ImapEnabled $true -EwsEnabled $true -MAPIEnabled $true -OWAEnabled $true -PopEnabled $true -OWAforDevicesEnabled $true
Powershell Enable All Access

Powershell Enable All Access

These commands must be run on all CAS Server.

If you want to use Set-CasMailbox with Get-Mailbox, be carefull to not disable the administrator account.


You can get more information about the Set-CasMailbox here.


Leave a Reply

Your email address will not be published. Required fields are marked *