I used the following steps to do this.
4. Remove the public folder store
Remove–PublicFolderDatabase –Identity "Public_Folder_Store_Name"
5. change the server that is responsible for generating the Offline Address Lists
Move-OfflineAddressBook –Identity OfflineAddressBookIdParameter -Server ServerIdParameter
6. Move the Routing group Connectors by using the following command:
7. To modify any Send connectors that have the first Exchange 2007 server as the source transport server, run the following commands:
How to use the Exchange Server SP1 2007 Setup wizard to remove Exchange 2007
Log on to the server from which you want to remove Exchange 2007.
Open Control Panel, and then double-click Programs and Features.
In Programs and Features, select microsoft exchange server 2007, and then click Uninstall.
If you click Change instead of Uninstall, you can add server roles, but you cannot remove server roles.
In the Exchange Server 2007 SP1 Setup wizard, on the Exchange Maintenance Mode page, click Next.
On the Server Role Selection page, clear all the server role check boxes, clear the Management tools check box, and then click Next.
By default, all server roles are selected. This indicates that no server roles will be removed. To remove a server role, you must clear the appropriate check box.
On the Readiness Checks page, after the check completes, click Uninstall.
On the Completion page, click Finish.
(Optional) If you are removing Exchange from a Mailbox server, remove the Exchange database files (*.edb) and storage group log files (*.log).
If you reinstall the Mailbox server role on this server, you must first remove the database and log files from the server.
(Optional) Remove the setup log files that are located at %systemdrive%\ExchangeSetupLogs.
(Optional) Remove the following virtual servers that are created for Exchange 2007 under the Default Web Site in iis:
When you remove Exchange 2007, neither IIS nor these virtual servers are removed
9. First Remove the Passive Mailbox Node
10. Second the Primary Mailbox Role
11. Remove the CAS/HUB's Role on the nodes
Important: NOT AT THE SAME TIME
12. Demote the Cluster
13. Demote the NLB Cluster
14. Remove the Servers from the domain
15. shutdown the Servers
16. Take a cold bier when you are don with testing and everything works