PowerShell Disable-Mailbox

PowerShell Disable-Mailbox For Exchange 2010

Disable-Mailbox really should be called ‘disconnect mailbox’ because this commands breaks the connection between the Active Directory user its Exchange mailbox.  This means you could recreate the link using Connect-Mailbox.

Topics for Exchange Disable Mailbox


Getting Started with Disable-Mailbox

As we will see later, Disable-Mailbox has a surprising number of parameters; thus all the more reason to start with a simple example.

Example 1: Exchange Disable-Mailbox -Identity

Disable-Mailbox -Identity "Guy Thomas" -Database DB01

Note 1a: "Guy Thomas" must already exist as an active directory user. 

Note 1b: Although -Identity is a required parameter you could use the corresponding Domain\Account instead of "Guy Thomas".

Example 2: Disable-Mailbox -Database

Disable-Mailbox -Identity "Guy Thomas"

Note 1: Actually, you don’t need to use the -Identity parameter because it’s assumed.

Note 2: If you are going to use -Identity then in addition to Alias you can use any of these values: GUID, Distinguished name (DN), Domain\Account, User principal name (UPN) LegacyExchangeDN or  SmtpAddress.

List the Disable-Mailbox Parameters

Extend your scripting capabilities by getting to know more of this PowerShell cmdlet’s parameters:

# Exchange Disable Mailbox Parameters
Get-Help Disable-Mailbox

Most of the extra parameters cater for Arbitration (Workflow)or and Archive.

See more about Disable-Mailbox.

Free Download of Exchange Monitor from SolarWindsGuy Recommends: The SolarWinds Exchange Monitor

Here is a free tool to monitor your Exchange Server.  Download and install the utility, then inspect your mail queues, monitor the Exchange server’s memory, confirm there is enough disk space, and check the CPU utilization.

This is the real deal – there is no catch.  SolarWinds provides this fully-functioning freebie, as part of their commitment to supporting the network management community.

Free Download of SolarWinds Exchange Monitor

Disable-Mailbox PowerShell cmdletCompare PowerShell with the EMC

From a learning point-of-view it it’s worth a walk-through in the Exchange Management Console (EMC), the benefit is you can compare the PowerShell script with what you see in the Exchange GUI.

  • Launch the EMC, navigate to the Recipient Configuration.
  • Select your user’s mailbox (see screenshot right.)

Other Members of the Mailbox Family of Cmdlets

Get-Command -noun Mailbox

More Examples of Exchange Mailbox Commands

These PowerShell cmdlets work equally well in Exchange 2010 and 2007.

Note 3: There is also Disable-MailboxStatistics

Try this: Get-Command -noun Mailbox*

Note 4: See more on PowerShell’s Disable-Mailbox.

Summary of Exchange Disable-Mailbox

Disable-Mailbox disconnects a mailbox from its Active Directory user.  Consequently, you could recreate the link by using Connect-Mailbox.

If you like this page then please share it with your friends


See more PowerShell Cmdlets for Exchange 2010:

Exchange 2010 Home   • Enable-Mailbox   • Disable-Mailbox   • New-Mailbox   • Set-Mailbox

Get-Mailbox   • Get-MailboxStatistics   • Connect-Mailbox   • Export-Mailbox   • Import-Mailbox

Exchange 2010 PowerShell commands   • Get-ExchangeServer   • Get-MailboxDatabase

Please write in if you see errors of any kind.  Please report any factual mistakes, grammatical errors or broken links, I will be happy to not only to correct the fault, but also to give you credit.