Today's post will show how to remove Exchange server from your domain. I'm simulating it on my lab environment where I'm running single Microsoft Exchange 2013 server. For organizations moving to Office 365, the best way to seamlessly migrate, is to go hybrid. First you move all mailboxes and then you decomission your Exchange server. You should keep at least one Exchange server on-premises, according to Microsoft. You'll see it at the end of the post.
But this is a single lab scenario where In my case I'm running single Exchange Server 2013 and I want to perform a complete uninstall from the member server and decommission this server from AD etc……
It's not that simple as even after you think that you have deleted all mailboxes, there are still some left. Also, Exchange Server has many dependencies, it modifies AD schema, even if there is no more mailbox left on the server it's not possible to uninstall that “app” because it tells you that ..
“This mailbox database contains one or more mailboxes, mailbox plans, archive mailboxes, public folder mailboxes or arbibration mailboxes.”
So we'll look at this step by step in order to try to get this done. First we check the list of all databases on this server via
Get-Mailboxdatabase
The output:
We got the response. Our database's name is 1720591215. Not very sexy, hmm?
Now, if there are any Accounts that have archive enabled, you won't be able to delete those.. Check the image below.
Quick check on our environment will show us that we have some mailbox left, where one of the mailboxes is the default domain's admin mailbox and the other one some test mailbox…
So quick check of Technet here will tell us that we need to disable the archive on an on-premise mailbox…
You can go through the EAC (Exchange administration console) or through the Shell.
- Navigate to Recipients > Mailboxes.
- Select a mailbox.
- In the details pane, under In-Place Archive, click Disable.
Done, now that we removed the archiving, let's try to remove those mailboxes. Through the EAC….
Whether the admin mailbox was possible to remove, the default domain account's mailbox wasn't. You know why? (and I'm glad it did throw an error… -:)
The primary difference between deleting and disabling a mailbox is that when you disable a mailbox, the Exchange attributes are removed from the corresponding Active Directory user account, but the user account is retained. When you delete a mailbox, both the Exchange attributes and the Active Directory user account are deleted. This difference also determines your options to reconnect or restore disabled and deleted mailboxes.
What needed to be done is that one needs to disable the account(s), via EAC for example. And and then only it's possible to delete the database…
Through the EAC you select the database > delete.
Now when we want to uninstall Server Exchange from our member server we have no error message, so we can proceed with a clean removal….
Exchange has 14 steps to complete…. quite tedious, but seamless for an admin (if everything goes well… finger crossed -:)….
Then we have the final screen which asks us to kindly reboot the server…
After reboot all is gone. No Exchange Services left…
Quick look to AD, and even there the OU Microsoft Exchange Security Group is gone! It seems that the operation was succesfull…
Exchange Server on-premise was and is not easy to do without special Exchange learning, training and (or) certifications. That's why a lot of admins and organizations prefer to leave those administration tasks and externalize Exchange Server > migrate to Office 365.
Why would you need to decommission Exchange Server?
Yes. Why? Perhaps you want to be free? Perhaps you no longer wants to be locked into Exchange? Or perhaps simply you have your ISP providing you e-mail servicing with your domain and this is sufficient for your organization.
With Microsoft and Exchange Server, in hybrid Exchange configuration (on-prem and Office 365) the recommended practice says to keep at least one Exchange server. Why? (why should you have at least one Exchange server (hybrid) On-premises).
The key here is to understand if the Office 365 objects depend and are synced from the on-premises Active Directory, and if they are you need to have your on-premises Active Directory extended and you need to have a supported tool to edit those objects on-premises.
What's the supported tool? ADSI edit?
No
The Exchange Management Console, the Exchange Administration Center (EAC), and the Exchange Management Shell are the only supported tools that are available to manage Exchange recipients and objects. If you decide to use third-party management tools, it would be at your own risk.
Source link.
What about if I don't have or I don't want to pay for an Exchange server license?
Well, you don't have to (link) if you don't have on-premise mailboxes !!!
Well if the following conditions apply you can request an Exchange Hybrid Server product key, with no additional costs:
- You have an existing, non-trial,Office 365 Enterprise subscription
- You currently do not have a licensed Exchange 2013 or Exchange 2010 SP3 server in your on-premises organization.
- You will not host any on-premises mailboxes on the Exchange 2013 or Exchange 2010 SP3 server on which you apply the Hybrid Edition product key.
Sources:
- Technet disable or delete mailboxes
- Technet manage in place archives
- Technet How to and when to decommission your on-premises Exchange servers in a hybrid deployment.
- MSDN blog – why should you have at least one Exchange server (hybrid) On-premises