question

MartinHale-4225 avatar image
0 Votes"
MartinHale-4225 asked MartinHale-4225 commented

Uninstalling Microsoft Exchange 2007

Hi All,

I'm having some trouble uninstalling Mircosoft Exchange 2007 having completed a migration to Microsoft 365.

  • Background -

I inherited looking after IT for our small business and after a lot of pushing we’ve migrated our email from our in-house server to Microsoft 365 (at last!). The in-house server was Exchange 2007 (V08.03.0485.001) running in a SBS 2008 (SP2) environment. The migration from Exchange 2007 to Microsoft 365 went well following these instructions from Microsoft and our email is now running in 365 and the Exchange 2007 server application is redundant. The final step in the migration instructions is to ‘Decommission on-premises Exchange server(s)’ and gives a link to instructions for Exchange 2007, which links forward to here for the instructions. Currently we are retaining the SBS2008 server while we finish migrating off it.

  • Problem -

Using the Control Panel > Programs & Features > Uninstall option produces the following error:
Error: Unistall cannot continue. Database ‘Public Folder Database’: Exchange is unable to check the public folder replicas for “SERVER\Second Storage Group\Public Folder Database”. Verify the Microsoft Information Store service is running on SERVER.domain.local, and that the database is properly mounted.

Services says that the Microsoft Exchange Information Store service is started. The Exchange management console shows in Server Configuration > Mailbox that the Public Folder Database is dismounted. From memory, this database has never been mounted in all the time I’ve been involved. But, when I try to mount it I get the following:

Microsoft Exchange Error
Failed to mount database 'Public Folder Database'.
Public Folder Database
Failed
Error:
Exchange is unable to mount the database that you specified. Specified database: SERVER\Second Storage Group\Public Folder Database; Error code: MapiExceptionCallFailed: Unable to mount database. (hr=0x80004005, ec=-515).

I’ve run the Database Troubleshooter from the Exchange Management Console Toolbox, which returns the following error:

Public Folders Container Deleted or Missing Required Attributes.
One or more MSExchangeIS 9519 Events with error code 0x972 were detected in the Application log.

Clicking through the ‘how to resolve this issue’ button, the help file suggests using ADSI Edit to check that both the CN=Folder Hierarchies container and that the CN=Public Folders object exists, which they do.
It then goes on to suggest checking that the msExchOwningPFTreeBL attribute value of the CN=Public Folders object matches the affected Public Folder Store, but msExchOwningPFTreeBL doesn’t exist in the attribute list. I do have msExchPFTreeType, but no other msExch….. attributes.

Also, the distinguishedName of the CN=Public Folders object (CN=Public Folders,CN=Folder Hierarchies,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC=local ) matches the value of msExchOwningPFTree of the CN=Public Folder Database at CN=Public Folder Database,CN=Second Storage Group,CN=InformationStore,CN=MLSERVER,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC=local

From what I can tell, I need the database to be mounted before I can uninstall Exchange.

Any help greatly appreciated!











office-exchange-server-administrationoffice-exchange-server-deployment
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LucasLiu-MSFT avatar image
0 Votes"
LucasLiu-MSFT answered LucasLiu-MSFT commented

Hi @MartinHale-4225 ,
Is there any data that needs to be retained in your database and on-premises Exchange server?

Based on the research of the error information you proviede, I found an official article for this error, you can try the solution first to see if you can successfully mount the database.
For more information: Event ID 9519 and error 0x80004005 when you try to mount a database in Exchange Server

For the error 0x972 and MSExchangeIS 9519, there are many possibilities for this error. You can try to fix it through the solution provided in the link below.
For more information: MSExchangeIS 9519 0x972: Public Folders Container Deleted, or Missing Required Attributes
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.



If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MartinHale-4225 ,
Do suggestions above help? If the issue has been resolved, please click “Accept as answer” to mark helpful reply as an answer, this will make answer searching in the forum easier and be beneficial to other community members as well.

Thanks for your understanding.



If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 Votes 0 ·

Hi @MartinHale-4225 ,
I am writing here to confirm with you how thing going now? If the above suggestion helps, please click “Accept as answer” to mark helpful reply as an answer.Your action would be helpful to other users who encounter the same issue and read this thread.
Thanks for your understanding.



If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 Votes 0 ·
MartinHale-4225 avatar image
0 Votes"
MartinHale-4225 answered LucasLiu-MSFT commented

Hi @LucasLiu-MSFT

Thanks for your suggestions.

Regarding the first resolution to your first suggestion, The Exchange Server CD is not available. Following the instructions 'How To Prepare Active Directory and Domains' from the help file, command prompt returns the following:

C:\Users\MLADMIN>setup /PrepareSchema
Welcome to Microsoft Exchange Server 2007 Unattended Setup
Preparing Exchange Setup

Exchange Server setup encountered an error.

This is also true for 'setup /PrepareLegacyExchangePermissions', 'setup /ps' and 'setup /pl'.

From the second resolution, 'Domain Controller Security Policy' is not available from my Administrative Tools list. From the Group Policy Management MMC I can see that for the 'Default Domain Controller Policy > Settings> Security Settings> Local Policies/User Rights Assignment > Manage auditing and security log', 'Server Name\Exchange Servers is present.

Regarding your second suggestion, the CN=Public Folders object does exist at CN=Public Folders,CN=Folder Hierarchies,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=mlexecs,DC=local.

But: the attribute 'msExchOwningPFTreeBL' does not exist within the properties of CN=Public Folders. Might this be the root of my problems?

However, the value of the 'distinguishedName' attribute of CN=Public Folders is the same as the value of 'msExchOwningPFTree' attribute of the container CN=Public Folder Database at CN=Public Folder Database,CN=Second Storage Group,CN=InformationStore,CN=MLSERVER,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=mlexecs,DC=local

Thanks,

Martin








· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MartinHale-4225 ,
Is there any other specific error display after running the command line?

Since Exchang 2007 has been retired, I checked it in Exchange 2010 and found that there is a attribute "msExchOwningPFTreeBL". Please make sure that all display properties are checked in "Filter". And please make the attribute “msExchOwningPFTreeBL” point to the correct path.
79490-2.png

In addtion, is there any data that needs to be retained in your database and on-premises Exchange server? If Exchange 2007 will to be uninstalled and there is no need to retain any data, you can consider deleting it directly from ADSI.



If the response is helpful, please click "Accept Answer" and upvote it.



0 Votes 0 ·
2.png (52.7 KiB)
MartinHale-4225 avatar image
0 Votes"
MartinHale-4225 answered

Hi @LucasLiu-MSFT,

Apologies for the delay in responding.

I'm afraid there's nothing more specific in command line.
81100-cmd-line.png

I have now found the attribute 'msExchOwningPFTreeBL' within the properties of CN=Public Folders - it was hidden by a filter. The attribute value shows as 'CN=Public Folder Database,CN=Second Storage Group,CN=Infortmation Store,CN=SERVERNAME,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SDPLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domainname,DC=local', which i believe is correct.
81161-adsi-tree.png

We have migrated all the data we need out of Exchange 2007 now and into Microsoft 365. The reason I need to uninstall Exchange is that currently, whenever I launch Outlook on any of our Windows 10 desktops, the Outlook application gets stuck in a loop of asking for credentials. If you press cancel, you eventually get the below pop up. I'm assuming this is because there's an entry in the AD on the in house domain server telling outlook to look at Exchange 2007? I'm hoping that correctly uninstalling exchange would resolve this.
81108-outlook-popup.png

Thanks,
Martin



cmd-line.png (5.1 KiB)
adsi-tree.png (88.8 KiB)
outlook-popup.png (14.1 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LucasLiu-MSFT avatar image
0 Votes"
LucasLiu-MSFT answered MartinHale-4225 commented

Hi @MartinHale-4225 ,
Please try to the methods in following article to remove the public folder database. If you remove the public folder successfully, then try to uninstall Exchange server 2007 again.
Please refer to: How to Remove a Public Folder Database and Removing Public Folder Databases

For your situation, please run the following command to remove the the service connection point (SCP) value. Then clean the local cached credentials in Windows Credentitals and recreate the Outlook profile.

 Get-ClientAccessServer | Set-ClientAccessServer -AutoDiscoverServiceInternalUri $Null

In addtion, Although Microsoft does not recommend it, but considering that your environment does not have any data that needs to be retained, you can also try to delete the public file database through ADSI: Remove public folder using ADSIEdit



If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @LucasLiu-MSFT ,

Following through the articles you referred to, I got down to step 2 of 'Removing the Last Public Folder Database From an Organization' in this article, which refers to the article 'How to Delete Multiple Public Folders from Your Organization'. Following the instructions at step 1 returns the below:
83293-remove-public-folder.png.

Following to step 6 of 'How to Remove a Public Folder Database' returns the below error:
83197-public-folder-remove-error.png

Is this now at the point where I need to remove the public folder using ADSIEdit? Is that likely to let me then uninstall exchange?

I have now successfully set up working profiles on our local Outlook applications.

Thanks,

0 Votes 0 ·

Hi @MartinHale-4225 ,
First, try to repair the database as follows. Run the following command line to use eseutil to detect the database that you cannot mount successfully, and then check whether the status of your database is "clean shutdown" or "Dirty shutdown". If it is "Clean shutdown", it means that your database file itself is not damaged, then run "eseutil" /r" for soft recovery. If it is "Dirty shutdown", it means that the necessary log files are missing, and you need to run "eseutil/p" for hard recovery, but it should be noted that hard recovery will result in the loss of log files.

 <path of database file>eseutil/mh "edb file"

83952-5.png






0 Votes 0 ·
5.png (94.3 KiB)

If it still fails to mount, we will consider deleting it directly from ADSI. In addition, here is an article on how to delete Exchange server from ADSI. This will be our last choice.
Please refer to: How to remove Exchange from Active Directory
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.



If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




0 Votes 0 ·