Disable Active Directory Account to Stop Email in Exchange

Shini Mohan | November 12th, 2016 | Exchange Server, General Info

Exchange server comprises of an active directory, which is quite useful while accomplishing task in the server. Well, there are some benefits of this directory account, and some disadvantages therefore, it is important to be aware from the measures to enable and disable Active Directory accounts in Exchange email. In this post, we are going to discuss about all the possible ways to disable Active Directory account with powershell commands of the server.
disable active directory

Approach to Disable Active Directory Account

The most appropriate solution to stop active directory services from an Exchange account is to use cmdlets of Exchange powershell. Here we are going to use command (i.e., Remove-DatabaseAvailabilityGroupServer) which eliminates Mailbox server from database availability group of the Exchange server.

Syntax of Command

The following screenshot demonstrates the format of this command:
Disable Active Directory Account Stop Email
To understand the way of using command in more simple way, you can go through following example:
This sample of command indicates the way of removing Mailbox server (MBX1) from database availability group (DAG2)
Disable Active Directory Account Stop Email
Note: Ensure that Mailbox server is not hosting any duplicate database while removing it from DAG

Description of Each Parameter Used In Command Syntax:

  • Remove-DatabaseAvailabilityGroupServer: This a cmdlet in powershell of the Exchange server whose basic functionality is to remove mailbox server
  • Identity: It is used to specify the DAG account name, which you want to remove from the server
  • MailboxServer: The Mailbox server which is to be removed from database availability group is mentioned in this parameter
  • ConfigurationOnly: If the Mailbox server has been lost and cannot be contacted then we can use this parameter in syntax for restoring such mailboxes
  • Confirm: It is used to display the confirmation prompt window on screen after completion of the procedure. However, this command is optional in the syntax therefore, it is not mandatory to use this command
  • Domain Controller: This attribute is used to denote the domain controller which is used by the main cmdlet. Basically, it is used either to read data in Active directory or to write data into it
  • SkipDagValidation: The attribute is used to take a decision which is related to status of DAG. It specifies whether to validate the bypass of quorum model or not
  • WhatIf: It is basically an action commands which is used to view the modifications occurred without any permissions from user’s end.
Tip: There are some optional parameters like ConfigurationOnly, Confirm, Domain controller, SkipDagValidation, and What if. If required by the server user, then only they can use them in syntax of command.


The main parameters used in the syntax of Powershell command are Identity and MailboxServer. Apart from these attributes, other all parameters are optional to disable Active Directory account to stop email in Exchange using powershell of the server.