Manage Learn to apply best practices and optimize your operations.

How to manually uninstall Exchange Server 2010

Severe damage to Exchange Server 2010 may require you to uninstall the program. Follow these tips to prevent harm to Active Directory.

Over the past few years, I’ve encountered a few Exchange servers that were so severely damaged that the only way...

to fix them was to remove and reinstall the product. Unfortunately, no single technique to manually uninstall Exchange Server 2010 works in every situation. Depending on the type of damage done, whether from severe disk corruption or something else, you may have to use a number of different procedures.

The easy Exchange 2010 uninstall
Before attempting to manually remove Exchange 2010, try a simple uninstall. Open the Control Panel, click Uninstall a Program, click Microsoft Exchange Server 2010, and then click Uninstall.

Some of these methods are more invasive than others. To minimize the potential of further damage to your network, try the least invasive techniques before moving on to more drastic measures.

Check your network before uninstalling Exchange 2010
When it comes to uninstalling Exchange 2010, the majority of problems I’ve seen are related to Active Directory (AD). Just about all Exchange Server 2010 configuration information is stored in AD rather than the server itself. Therefore, if the server is having problems communicating with Active Directory, then the Exchange Server removal process will likely fail.

As strange as it may sound, the first thing administrators should do is verify that the Domain Name System (DNS) server has a host record for the Exchange Server and that the host record points to the correct IP address. In the past year, I have seen at least four situations where an invalid host record led to a slew of Exchange 2010 problems. After you’ve verified the DNS records, take a moment to verify that the basic network connectivity is working properly.

Rebuild the server before uninstalling Exchange 2010
Because almost all of Exchange 2010’s configuration information is stored in AD, you can’t simply reformat the server. If you do, other Exchange servers will think that the Exchange server with problems still exists.

A better solution is to use the information stored in AD to return the server to a functional state and then uninstall Exchange. Here’s how:

  • Get an Exchange installation disk (make sure it contains the same service pack level as the server you’re trying to remove). Run the Setup /M:RecoverServer command.

    This will make Setup refresh all the Exchange binaries. For more severe problems, back up any data that exists on the server -- including Exchange Server databases -- document the server’s name, IP address, service-pack levels and any other important configuration information.

  • Next, format the server, then reinstall Windows using the same edition and service pack that you used previously.
  • Now, open the Active Directory Users and Computers console, right-click on the computer account for the server you’re having problems with, and select Reset Account. Do not delete the computer account.
  • Assign the server its original name and IP address, then join the domain. After joining the domain, use an Exchange 2010 installation DVD (again, with the same service pack level as was previously used) to deploy Exchange. However, rather than installing Exchange as you normally would, run the Setup /M:RecoverServer command.

    The result is a server that is running a clean copy of Windows and a clean copy of Exchange. You can now remove Exchange through the server’s Control Panel.

Uninstalling Exchange Server 2010 -- desperate measures
The techniques I’ve described so far work only if Active Directory is functioning properly. Sometimes corruption within AD can make removing Exchange through these methods impossible. In those cases, you must manually manipulate AD.

Note: Do this at your own risk, and make certain to back up your domain controllers first. You can do irreparable damage to AD if you make a mistake.

To edit Active Directory, you must use ADSIEdit, which is included with the Windows Support Tools. To launch the console, simply enter the ADSIEdit command. When the console opens, right-click ADSIEdit, and select the Connect To command.

Click OK to accept the defaults, and you’ll be connected to Active Directory. What you need do next depends on the problem you’re experiencing. For example, if a public folder prevents you from removing Exchange, use ADSIEdit to remove the public folder. You can also use ADSIEdit to remove all references to a particular Exchange server, effectively removing that server from AD.

Many additional ASDI-related fixes are available online, so make sure to check there if you’re having a problem and determine you need ADSIEdit.

Regardless of whether you use ADSIEdit or one of the other methods described above, your ultimate goal is to gracefully uninstall Exchange 2010. This is the only way to ensure that Active Directory is left in a clean state after the removal process.

Brien Posey
is an eight-time Microsoft MVP with two decades of IT experience. Before becoming a freelance technical writer, Brien worked as a CIO for a national chain of hospitals and healthcare facilities. He has also served as a network administrator for some of the nation’s largest insurance companies and for the Department of Defense at Fort Knox.

Dig Deeper on Exchange Server setup and troubleshooting