Removing an Exchange Server Mailbox from your environment

Most of the articles are about new installation, deployment, adding more features and etc. Today, we are going over a different topic which is the process to remove Exchange Server 2016 server from an existent environment. In this article, we will focus on removing from a single server and in a future article here at MSExchange.org we will be removing Exchange Server from a member of a DAG (Database Availability Group).

Preparing the server to be removed…

Before going to the technical steps in removing an Exchange Server from an Exchange Organization, make sure to validate these following key points:

•Remove AV from the server
•Remove the Backup agent from the server
•Remove the Monitoring agents, when using SCOM, make sure to remove the agent from the console as well
•A restart of the server before starting the process is always helpful
•Make sure that you moved all mailboxes from the server that you are trying to remove

A good way to test if the server has any mailbox hosted, it is running the following cmdlet, and it will provide a list of all current mailboxes being hosted on the desired server.

Get-Mailbox –Server <ServerName>

If you want the specific number of mailboxes, and don’t want to copy and paste that information into Excel, you can run the following cmdlet:

(Get-Mailbox –Server <ServerName>).count

Another way to make sure that the mailboxes are gone is by trying to delete the Mailbox Databases themselves, if there is any mailbox being hosted an error will be displayed and we won’t be able to delete it. In order to list all databases of any given server, the following cmdlet can be used.

Get-MailboxDatabase –Server <ServerName>

If there is any mailbox still hosted on the server, the administrator can use EAC (Exchange Admin Center) or use the following cmdlet to move the mailbox to another mailbox database.

New-MoveRequest <mailbox> -TargetDatabase <Database-Destination>

The administrator must check the Receive Connectors, perhaps the server that is being removed has a special relay connector or something like that.  A regular Exchange Server 2016 will have five (5) Receive connectors and their names will match the names listed on the image depicted below.

Image

We must check the Send Connectors as well, using the following cmdlet all Send Connectors of the organization will be checked against the server name, the expected result is a clean output.

Get-SendConnector | Select Identity –ExpandProperty SourceTransportServers | Where-Object { $_.Name –eq ‘<ServerName>’}

Removing Exchange Server using the graphical user interface…

When removing a server that is by itself which means not a part of database availability group, the process is extremely simple, just open Control Panel, click on Uninstall a program, then select Microsoft Exchange Server 2016 (Item 1) from the list and click on Uninstall (Item 2).

Image

The Exchange Server setup will start a wizard to remove the product, just follow using default values and the uninstallation process should occur smoothly.  One nice feature on the uninstall process is the Readiness Checks which will check the current server and point out any issues that will not allow the removal of the current server from the Exchange Organization. The administrator must check the error messages and fix all the errors listed before moving forward with the removal process.

Image

Using the command line interface…

We can also use the command line interface to uninstall Exchange Server, logged as administrator on the command prompt and using the ISO file from the installation the following command can be used.

Setup /mode:uninstall /IAcceptExchangeServerLicenseTerms

Image

Removing manually…

This section you should use as a last instance and when the server is not coming back to life with the same name. It is ideal for any server that is being decommissioned and they will be formatted and repurposed to another role and/or service.

This task can be performed from any server with Active Directory tools installed and not necessarily from Exchange Server. Open ADSIEdit (click on run and type adsiedit.msc). Right click on the first icon on the left side and click on Connect to… and on the new dialog box, make sure to select Configuration, and click OK.

Image

Now we have to go deeper inside of the Active Directory configuration to find the server that we want to remove.

1. Expand Configuration (Item 1)
2. Expand CN=Configuration (Item 2)
3. Expand CN=Services (Item 3)
4. Expand CN=Microsoft Exchange (Item 4)
5. Expand CN=<Organization Name> (Item 5)
6. Expand CN=Administrative Groups (Item 6)
7. Expand CN=Exchange Administrative Group (FYDIBOHF23SPDLT) (item 7)
8. Expand CN=Servers
9. Right click on the desired server listed on the right side and click on Delete
10. Confirm the operation by clicking on Yes on the confirmation dialog box
11. A new dialog box asking to confirm the deletion of the container and everything in it will pop up, click on Yes again.

Image

After removing an Exchange Server manually, the administrator must check other settings where that server may have been configured in the Exchange Organization, for example: Send Connectors, Databases, Database Replication, Receive Connectors used by this server, Load Balancers pointing out to that server, and so forth.

About The Author

1 thought on “Removing an Exchange Server Mailbox from your environment”

  1. Phuong Nguyen Van

    Dear Mr Anderson Patricio

    I have just done migration Exchange 2010 co-exist to Exchange 2016.
    My organization has no need for legacy public folder data in Exchange 2010.
    I have not been yet migration Public folder from 2010 to 2016. However public folder unused folder and no data in Exchange 2010. I want to ask me to remove the old Exchange server 2010 without moving public exchange 2010 to 2016 was not whether there is an error and what is not.

    After a couple of weeks I
    shutdown the Exchange 2010 server trying to check for distraction on Exchange
    2016. The result I checked the Client use Outlook 2010 error workstation
    windows Credential user prompting on Outlook asked to enter the Outlook logon
    password

    Inline image 1

    I have to power on Server exchange 2010 and start services Exchange 2010 see Client outlook connect to
    Public folder Exchange 210 old is reason ask prompting password logon.

    Outlook will keep prompting if Exchange 2016 mailbox access a public folder in Exchange 2010. And
    this is caused by improper authentication method.

    Inline image 2

    Inline image 3

    Let me ask is there a way to completely remove the old

    Exchange 2010 server from the system safely that the Outlook 2010 workstation
    can use to connect to the Exchange 2016 server without reporting an outlook
    password logon error?

    I have a post in forum MS link
    https://social.technet.microsoft.com/Forums/office/en-US/f92ec41a-9e60-4c8a-bfb2-9fd91e833475/remove-public-folder-after-migration-exchange-2010-to-exchange-2016?forum=Exch2016Adm
    Many thanks

Leave a Comment

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top