The GUI Metadata Cleanup Utility removes Active Directory domain controller metadata left behind after a domain controller is removed improperly or unsuccessfully (typically a dcpromo /forceremoval). This script was written by Clay Perrine and submitted by Kurt Hudson, both of Microsoft.
This script queries Active Directory to locate all domain controllers in the domain. It then displays these domain controllers in an input box that reads “Enter the computer name to be removed.” Type the name of the domain controller and click okay; the metadata for the hostname that was entered will be removed from the directory.
將擴展名改爲vbs後即可直接運行。