This blog is about decommissioning one of few Exchange 2010 servers in an exchange organization.

The exchange server we are trying to decommission is a typical CAS/HUB/MBX role server with a public folder and mailbox database each.  Assumption is that all mailboxes and public folders have been moved to another server.

Deleting Mailbox database

If you have already moved all the mailboxes, you run get-mailbox on that database, you should get nothing:
image
Lets see if it has any arbitration mailboxes:
image
we can see there are 3 arbitration mailboxes which are not normally seen.  Because of these mailboxes, if you try to remove the database, you get:
image

So what is an arbitration mailbox and why is it hidden?

Arbitration mailboxes are a place holder for emails and information for moderation.  Moderated transport is new in Exchange 2010.  Here is a good article on Moderated transport.  These mailboxes are created when the first exchange server is deployed.  You can recreate these mailboxes (if they are accidentally deleted) by running setup.com /prepareAD. They are hidden because they are used for internal exchange moderation workflows and user intervention is not required.

Coming back to our server, so how do we remove these mailboxes? We already learnt how to enumerate them, so they can just be piped to a move-request commandlet so they are moved to the new database you had created for your other mailboxes.  Here is an example:

image
where db1 is the database on another server.  If the command runs successfully, we get:

image

You can view these move request in EMC :

image

Now if we run the get-mailbox –arbitration commandlet for the database we want to remove, we shouldn’t get any listed:

image

Now lets try to remove the database:

image
as you can see we were able to remove this database successfully.

Deleting Public Folder

If the goal is to move the public folder to another server (like in our scenario here), MoveAllPrelicas.ps1 is the easiest way to use it. Here is a TechNet article on it. The syntax is:

.MoveAllReplicas.ps1 -Server Server01 -NewServer Server02

Now, after you have moved all the mailboxes, lets see if the database has any arbitration mailboxes.

Before deleting public folder, lets identify if any of the mailbox databases are using this public folder as its default public folder.  This PS command can be run to enumerate the name of the mailbox database and its corresponding public folder database:

image

If any of the databases have the public folder being removed as its default public folder, now would be a good time to change it to another public folder where you would have replicated the data to.

Once the public folder does not have any data, it can be removed by using :

image

Once the mailbox databases and public folder database is removed, verify that there are no connectors that is using the mentioned server.

We are ready to uninstall Exchange Server 2010, go ahead and start Add/Remove Programs.  Start, type appwiz.cpl

image

Highlight Microsoft Exchange Server 2010 and click on Uninstall

image

Unselect the roles that needs to be uninstalled.(note that management tools won’t be enabled to be unselected unless all the other roles are unselected)

image

Click next and if everything was followed as per the article, the server will be free of Exchange Server 2010.