How to uninstall Exchange Server 2007 and individual server roles

Get detailed instructions on how to uninstall Exchange 2007 and its server roles, including the Client Access, Edge Transport, Hub Transport and Mailbox server roles.

Uninstalling Microsoft Exchange Server 2007 isn't as simple as running Setup and choosing the uninstall option. Moving specific server roles to different hardware can also be difficult because there are several required removal tasks that aren't outlined or available through the Exchange 2007 Setup wizard. The Mailbox and Hub Transport server roles are particularly challenging because there are complicated steps involved in uninstalling...

them.

If you have any comments or questions about the information presented in this tutorial, please email us.

This tutorial takes the guesswork out of removing Exchange Server 2007 or individual server roles from a computer. It provides detailed instructions on how to uninstall Exchange 2007 and its associated server roles, including the Client Access server role, Edge Transport server role, Hub Transport server role and Mailbox server role.


HOW TO UNINSTALL EXCHANGE 2007 AND SERVER ROLES

 Part 1: How to begin an Exchange 2007 uninstall
 Part 2: How to uninstall the Exchange 2007 Client Access server role
 Part 3: How to uninstall the Exchange 2007 Edge Transport server role
 Part 4: How to uninstall the Exchange 2007 Hub Transport server role
 Part 5: How to uninstall the Exchange 2007 Mailbox server role

Part 1: How to begin an Exchange 2007 uninstall

Whether you wish to perform a complete uninstall of Exchange Server 2007 or only specific server roles, the beginning portion of the uninstall process is fairly straightforward:

  1. On the server, go to Control Panel -> Add/Remove Programs.

  2. Select Microsoft Exchange Server 2007 from the list of installed programs.

  3. Click Remove to launch the Exchange Server 2007 Setup wizard.

  4. Click Next to bypass the Welcome screen and view a screen similar to that in Figure A, asking you which roles you want to remove.

    Figure A
    Figure A. Use the checkboxes to remove server roles.

  5. Clear the checkboxes corresponding to the roles you want to remove and click Next.

You can use the above process whether you want to remove an individual role from the server, or uninstall Exchange Server 2007 completely. When you click Next, the Setup wizard will perform a readiness check -- and that's where the trouble begins.

Exchange Server 2007 Setup wizard doesn't know how to deal with an uninstallation or role removal. This means that there are several tedious tasks that you will have to manage prior to removing various roles. The Exchange Server 2007 Setup wizard instructs you as to which tasks you must perform, as shown in Figure B.

Figure B
Figure B. The Setup wizard outlines several tasks you must perform prior to uninstalling Exchange Server 2007.

Unfortunately, the wizard doesn't give specific instructions on to how to perform these tasks, some of which include using the Recommended Action link to get more information. In addition, the Web sites that Recommended Actions are linked to are vague. In the remaining sections of this tutorial, I explain how to perform these tasks and provide step-by step instructions for properly uninstalling the Client Access, Edge Transport, Mailbox and Hub Transport server roles.

Return to Top

Part 2: How to uninstall the Exchange 2007 Client Access server role

Removing the Client Access server role is fairly simple:

  1. On the Exchange Server, go to Control Panel -> Add/Remove Programs.

  2. Select Exchange Server 2007 from the list of installed applications, and click Remove to launch the Exchange 2007 Setup wizard.

  3. Click Next to bypass the welcome screen and move to a screen displaying various Exchange 2007 server roles that have been installed.

  4. Deselect the checkbox corresponding to the Client Access role, and click Next.

The Exchange Server 2007 Setup wizard will now check to make sure that it can remove the Client Access server role. Because there are no prerequisites that must be met, the Setup wizard will confirm that everything is ready and then begin removing the associated files.

For this particular server role, note that the Setup wizard will not prompt you to continue once prerequisite checks are completed. It will remove the Client Access Server (CAS) role -- whether you're ready or not.

The amount of time that it takes to remove the CAS role varies from server to server. On my test system, however, the entire process took just over five minutes from start to finish.

Return to Top

Part 3: How to uninstall the Exchange 2007 Edge Transport server role

Exchange Server 2007 Edge Transport servers are unique in that they're not connected directly to Active Directory or the rest of the Exchange organization. Instead, they use an Edge Subscription to replicate a minimal amount of information from Active Directory to a special Active Directory Application Mode (ADAM) partition stored on the server.

From a removal standpoint, this means that there is virtually no affect on your Exchange organization if you decommission an Edge Transport server. The only task you need to do prior to removing an Edge Transport server is eliminate the Edge Subscription.

There are two methods to remove an Edge Subscription. While these methods weren't verified in a lab environment, they both should work:

  • Method 1
    Open the Exchange Management Console from within your primary Exchange organization (not on the Edge Transport server, and navigate through the console tree to Organization Configuration -> Hub Transport. Select the Hub Transport container, and then select the Edge Subscriptions tab from the details pane. Now right click on the Edge Subscription you want to remove, and select Delete from the menu.

  • Method 2
    Open the Exchange Management Shell and enter the Remove-EdgeSubscription command. For the exact syntax of this command, read the Remove-EdgeSubscription description on the Microsoft Exchange Server TechCenter.

Return to Top

Part 4: How to uninstall the Exchange 2007 Hub Transport server role

When removing roles from Exchange Server 2007, two tend to be the most difficult: the Mailbox server role and the Hub Transport server role. The steps involved in removing the Hub Transport server role vary depending on whether there are other Exchange servers in your organization. The version of Exchange Server used on your servers also makes a difference. It is more work to uninstall the Hub Transport server role if there are Exchange 2003 servers in the organization than if Exchange 2007 was the only version in use.

Let's assume that you have some Exchange 2003 servers in your organization. If all Exchange servers are running Exchange 2007, or if your organization only consists of one server, then you may be able to skip some of these steps:

  1. On the Exchange server, go to Control Panel -> Add/Remove Programs to view a list of all installed applications.

  2. Select Exchange Server 2007 from the list of programs and click Remove.

  3. When Windows launches the Exchange Server 2007 Setup wizard, click Next to bypass the Welcome screen..

  4. You will now see a screen that displays the various Exchange 2007 server roles that have been installed. Deselect the checkbox corresponding to the Hub Transport role and click Next.

  5. The Setup wizard will perform a prerequisite check, because there are some steps that must be taken before the role can be removed. Specifically, the server hosting the Hub Transport role is configured, by default, to act as a bridgehead server for the various routing group connectors. These routing group connectors must be removed before the Hub Transport server role can be uninstalled.

If you have Exchange 2003 servers installed, then Exchange 2007 doesn't natively use routing groups, but will create them for backward-compatibility purposes. To eliminate necessary routing group connectors:

  1. Go to your Exchange 2003 server and open the Exchange System Manager.

  2. Navigate through the console tree to Administrative Groups -> your administrative group -> Routing groups -> your routing group -> Connectors.

  3. Select the Connectors container and the details pane will show you connectors for the routing group.

    The actual connectors that exist will differ from one deployment to another. Typically, there will be an Internet Mail SMTP connector and a routing group connector.

  4. Right click on the routing group connector, and select Properties from the menu.

  5. Go to the Remote Bridgehead tab, and check that the remote bridgehead server listed is one from which you want to remove the Hub Transport server role.

  6. If so, you can do one of two things:

    • Point the connector to a different remote bridgehead server.
    • Remove the connector completely.

  7. To remove the routing group connector, click OK to close the connector's properties sheet.

  8. Right click on the connector and select Delete from the menu.

  9. When Exchange asks if you really want to delete the connector, click Yes.

Exchange Server 2007 resources:
A primer of server roles and Exchange hardware

Test driving Exchange Server 2007

Planning for an Exchange Server 2007 environment

Exchange Server 2007 Learning Guide

There likely will be at least one more connector to delete. Although Exchange 2007 doesn't natively use administrative groups, it does create an administrative group for backward-compatibility purposes. This group contains its own routing group, which contains a connector. The name of this administrative group differs in each Exchange organization. By default, it is called the Exchange Administrative Group.

A long hexadecimal number in parenthesis should follow the words Exchange Administrative Group. It will also follow the default routing group within this administrative group. It is called the Exchange Routing Group, and will be followed by a long hexadecimal number in parenthesis.

To remove the associated routing group connector:

  1. Navigate through the console tree to Administrative Groups -> Exchange Administrative Group (long hexadecimal number) -> Routing groups -> Exchange Routing Group (long hexadecimal number) -> Connectors.

  2. Select the Connectors container, and the details pane will display a routing group connector.

  3. Right click on the routing group connector, and choose Properties from the menu.

  4. You will see a message informing you that you need a newer version of Exchange System Manager to edit the object. Click OK to ignore the message and go to the routing group's properties sheet.

  5. Look at the Remote Bridgehead tab. Because this routing group connector exists on an Exchange 2007 server, the remote bridgehead should point to a server in your 2003 routing group.

  6. Verify this and click OK to close the properties sheet.

  7. Right click on the routing group connector and choose Delete from the menu.

  8. Click Yes, when prompted, to remove the connector.

  9. Wait for the servers to synchronize with one another. Then go back to your Exchange 2007 server and try to remove the Hub Transport role. The server should now pass the prerequisite test.

  10. Once the readiness check is complete, click Uninstall to remove the Hub Transport role.

Return to Top

Part 5: How to uninstall the Exchange 2007 Mailbox server role

To uninstall the Mailbox server role, you must remove all mailboxes and public folders stored on the server.

To remove all mailboxes from the server:

  1. Open the Exchange Management Console and navigate through the console tree to Recipient Configuration -> Mailbox to view all the mailboxes in your organization.

  2. Identify the mailboxes stored on that server. If you only have one Exchange 2007 server in your organization, this won't bet an issue.

Mailboxes residing on an Exchange 2007 server are marked as User mailboxes, or other types of mailboxes. Any mailbox residing on Exchange 2000 or 2003 servers are listed as Legacy mailboxes (Figure C).

Figure C
Figure C. Legacy mailboxes reside on Exchange 2000 or 2003 servers.

I have only a few Exchange mailboxes, which isn't typical for most companies. If you can't tell which mailboxes are hosted on an Exchange 2007 server by looking at the console, then you can implement a display filter:

  1. Click the Create Filter link at the top of the console. You will see a series of dropdown lists.

  2. Choose Server from the first dropdown list, and make sure that the second dropdown list is set to Equals.

  3. Click Browse and select the server from which you want to remove the Mailbox server role.

  4. Click Apply Filter, and the list of mailboxes will be filtered so that only those residing on the specified server are shown (Figure D). This figure also gives an example of how I set up the display filter.

    Figure D
    Figure D. A display filter can help you determine which mailboxes reside on the server.

  5. Now that you know which mailboxes reside on the server, you have to move them. Right click on the mailboxes you want to move -- you can select multiple mailboxes -- and choose Move Mailbox from the menu to launch the Move Mailbox wizard.

  6. Select the server and information store where you want the mailboxes moved (Figure E).

    Figure E
    Figure E. Select a destination for the mailboxes you are moving.

  7. Click Next, and you will be asked how you want to deal with corrupt mailboxes and when the move should occur.

  8. Answer these prompts and click Move to move the mailbox.

  9. When this is complete, you will see a summary screen informing you that all mailboxes were moved successfully. Confirm that there are no mailboxes on the target server. To do this, go back to the Exchange Server 2007 Setup wizard, and click Retry. If you have moved all of the mailboxes off the server, then the warning message should disappear.

Removing the public folder tree

There is one more step involved in uninstalling the Mailbox server role from Exchange 2007. Now that you've removed all mailboxes, you must remove all public folders as well.

Microsoft initially shipped Exchange Server 2007 before it was complete. As such, there no mechanisms in the graphical user interface (GUI) to remove public folders. Service Pack 1, which will be released within the next few months, should correct this problem. Until then, you need to use the Exchange Management Shell to remove public folders.

Note: This procedure assumes that you have replicas of your folders on other servers. This is important because we aren't migrating public folder data to another server. Instead, we are deleting public folders from our target server.

  1. Open the Exchange Management Shell and enter the following commands (where yourserver is the name of the target server):

    Get-PublicFolder –ID '\' –Server yourserver -Recurse –ResultSize Unlimited -> Remove-PublicFolder –Recurse

    Get-PublicFolder –ID \'Non_Ipm_Subtree' –Server yourserver -Recurse –ResultSize Unlimited -> Remove-PublicFolder –Recurse

    The first command removes all of the public folders, except for those that the system created. The '\' in the command indicates that the removal action should begin at the root-level of the public folder tree. The second command removes public folders created by Exchange Server. This can include things like the offline address book (OAB) or the folder used to store free/busy information. Both commands use an unlimited result size, which is important for organizations with large public folder trees.

  2. After executing both commands, enter the following command to display any public folders that weren't removed:

    Get-PublicFolder –ID '\'

The instructions I just outlined should easily strip a public folder tree bare. There is a caveat though. I have found that those commands won't remove corrupted folders. So you may need to go back and manually reconfirm that all folders were removed.

Return to Top

ABOUT THE AUTHOR:   
Brien M. Posey, MCSE
Brien M. Posey, MCSE, is a Microsoft Most Valuable Professional for his work with Exchange Server, and has previously received Microsoft's MVP award for Windows Server and Internet Information Server (IIS). Brien has served as CIO for a nationwide chain of hospitals and was once responsible for the Department of Information Management at Fort Knox. As a freelance technical writer, Brien has written for Microsoft, TechTarget, CNET, ZDNet, MSD2D, Relevant Technologies and other technology companies. You can visit Brien's personal Web site at http://www.brienposey.com.
This was first published in November 2007

Dig deeper on Microsoft Exchange Server 2007

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWindowsServer

SearchEnterpriseDesktop

SearchCloudComputing

SearchSQLServer

Close