First, you should have Administrative rights on the domain controller (Enterprise Admins group)
in order to preform this procedure.
Second, you need to have Ntdsutil.exe line tool for Microsoft Exchange.

To clean up the both domain metadata cleanup and server metadata cleanup,
and you have Ntdsutil.exe included with Windows Server 2003
with no service pack follow this procedure:
1. At the metadata cleanup: command prompt, type "connection" and press "Enter".

2. At the server connections: command prompt, type "connect to server ServerName"
and press "Enter".

3. At the connection: command prompt, type "quit" and press "Enter".

4. At the metadata cleanup command prompt, type "select operation target" and press "Enter".

5. At the select operation target command prompt, type "list sites"and press "Enter".

6. At numbered list of sites appears. Type "select site TYpe_SiteNumber" and press "Enter".

7. At the select operation target command prompt, type "list domains in site" and press "Enter".

8. At numbered list of domains in the selected site appears. Type "select domain Type_DomainNumber" and press "Enter".

9. At the select operation target command prompt, type "list servers in site" and press "Enter".

10. At numbered list of servers in a domain and site is displayed. Type "select server Type_ServerNumber" and press "Enter".

11. At the select operation target type "quit" and press "Enter".

12. At the metadata cleanup command type "remove selected server" and press "Enter".

13. In case the server whose metadata you have removed is the last domain controller in the domain,
to remove the domain metadata:
At the metadata cleanup command prompt, type "remove selected domain" and then press "Enter".

14.At the metadata cleanup command prompt type "quit" and press "Enter".

 

15. At the ntdsutil command prompt type "quit" and press "Enter".

 

———————————————————————————–

To clean up the server metadata only and you have NTDSUTIL.exe included with
Windows Server 2003 SP1 follow this procedure:
1. Open a Command Prompt (Start-Run-cmd).

2. Type:ntdsutil, and press "Enter":

3. In the NTDSUTIL command prompt you have, type the following command, and press "Enter":
metadata cleanup

 

4. Type the following command and press "Enter":
remove selected server Type_Server_Name (distinguished name of your domain controller,
for example : cn=ServerName,cn=Servers,cn=SiteName, cn=Sites,cn=Configuration,dc=ForestRootDomain).
you can also use:
remove selected server Type_Server_NameXonType_Server_NameY (where Type_Server_NameX present
whose metadata you want to remove and Type_Server_NameY is The
DNS name of the domain controller you want to connect to and remove server metadata).