点击查看原文

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后即可直接运行。