Cleaning up SBS2011 after a Migration to Office365

Once you have ported all of your users to Microsoft 365 from your SBS 2011 server, you should be loo

Once you have ported all of your users to Microsoft 365 from your SBS 2011 server, you might be looking to clear out some of the services as it is now effectively,  a SBS 2011 Essentials server.

Before you carry out any of these task - if you are performing any of this remotely, make sure you have a backup VPN that does not rely on IIS as you will irrevocably lose connection otherwise!

If you are still using the SharePoint or the local file system then you can remove the Exchange Server for a start but this is not always as easy as one might expect. Exchange is a massively capable system designed for huge enterprises and other massive corporation environments. As such it can often refuse to be uninstalled because of existing databases or connectors. The readiness check then, is where it is easy to just give up and disable all of the services and leave the system halted, but intact.

The first issue is the existing database and the offline address books etc. that are associated with those databases. Once you have completed your migration to office 365 and have exported any disabled or old staff to PST (this is important as someone always needs to access something later on. The database is completely useless and shoudl be deleted, as should the existing connectors. You can of course do this with Exchange Powershell or the GUI but in this case - where many of the exchange rules do not apply for an SBS install that has long since left for 365 anyway - ADSIEdit is a better option as it is essentially a registry editor equivalent for the Active Directory. This is important to note - it is a Registry Editor equivalent for the AD and so must be treated with the same level of respect as it can do even more damage.

We need to be looking at the configuration settings on ADSIEdit as this is where Exchage Server lives. The connectors are located with the rest of the Exchange services, under the Services CN and then under Microsoft Exchange and then the Organisation and then the administrative Groups CN and finally the name of the administrative group itself. Here we can see the folders we are interested in - Databases and Routing Groups:

ADSI Exchange 2010 uninstall databases

ADSIEdit Exchange 2010 Connections

Now that the Exchange server is being retired we can delete the contents of the Database CN which should hold the mailbox and public folder databse in a standard SBS deployment.

The contents of the Connectors folder can also be deleted as none of the connectors will any longer serve any purpose.

Once you have proceeded with these removals you can begin to uninstall the Exchange Server 2010 software using the Control Panel as you would normally.

If there are any messages queued from part of the migration then - as they have not arrived anywhere in all this time - they can safely be removed as below:

Exchange 2010 Readiness Check Completed

The system should now complete the Readiness Check and begin to uninstall:

Exchange 2010 Uninstall Beginning

In my experience the stage that takes the longest is actually the Languages section on SBS 2011 which can inexplicably take around 60 minutes to complete even on a small installation:

Exchange 2010 Uninstall Languages Slow

then we must address the Exchange Server hangover that the IIS configuration files are suffering:

In all probability you will find that Remote Desktop Gateway no longer functions and that you have the following 2280 IIS error in your Windows Application Log:

Exchange 2010 kerbauth.dll IIS error 2280

This is because the applicationhost.config file in %systemroot%\system32\inetsrv\config\ still contains references to files installed by Exchange Server (this is an issue with 2013 and 2016 also) and they must be removed to restore normal functionality.

Take a copy of the file first just to be safe then open in notepad.exe or similar:

Inetsrv applicationhost.config file location

Search for v14 (Exchange 2010) or v15 (for exchange 2013 or 2016) and find the orphaned reference:

orhpaned Exchange References in applicationhost.config

Remove the line from < to /> inclusive and save the file

Run "IISRESET" on the server and then check the Application Event Log - the 2280 error should have stopped appearing.

Now try Remote Desktop Gateway - it should be working again.

Now the Microsoft Exchange Server services are gone and the system should be running a little lighter.

Add comment