Last night I faced a critical issue over one of active directory servers. It could not replicate data over the forest. After long search I found the need to remove the failed DC server from the forest.
Error below:
It has been too long since this machine laragment-inner fiji-content-fragment-inner">
Demote Active Directory Server from Forest
To remove a server from the forest follow the below steps:
- Forceful removal of DC
- Metadata cleanup
Before you start you need to make sure there is a server on the network to serve authentication requests. To check you can run the below command:
netdom /query fsmo
Forceful removal of DC
To resolve this behavior for Windows Server 2008 can run the dcpromo/forceremoval command to forcibly remove AD DS from a domain controller.
- Click Start, click Run, and then type the following command: dcpromo /forceremoval
- Click OK.
- At the Welcome to the Active Directory Installation Wizard page, click Next.
- Type administrator password
- If DNS service detected on the server a warning massage will appear. Click ok to delete the DNS configuration.
- On Summary click next.
- After completing click finish
If the computer rif;font-size:13px;line-height:19px;">
To clean up the metadata need to use the Ntdsutil.exe tool. This will be used on the DC server with below services:
- Active Directory Sites and Services,
- Active Directory Users and Computers.
Also, make sure that you use an account that is a member of the Enterprise Admins universal group.
Caution: Using the Ntdsutil utility incorrectly may result in partial or complete loss of Active Directory functionality.
To clean up metadata:
- At the command line, type Ntdsutil and press ENTER.
- At the Ntdsutil: prompt, type metadata cleanup and press Enter.
- At the metadata cleanup: prompt, type connections and press Enter.
- At the server connections: prompt, type connect to server <servername>, where <servername> is the domain controller (any functional domain controller in the same domain) from which you plan to clean up the metadata of the failed domain controller. Press Enter.
- Type quit and press Enter to return you to the metadata cleanup: prompt.
- Type select operation target and press Enter.
- Type list domains and press Enter. This lists all domains in the forest with a number associated with each.
- Type select domain <number>, where <number> is the number corresponding to the domain in which the failed server was located. Press Enter.
- Type list sites and press Enter.
- Type select site <number>, where <number> refers to the number of the site in which the domain controller was a member. Press Enter.
- Type list servers in site and press Enter. This will list all servers in that site with a corresponding number.
- Type select server <number> and press Enter, where <number> refers to the domain controller to be removed.
- Type quit and press Enter. The Metadata cleanup menu is displayed.
- Type remove selected server and press Enter.
You will receive a warning message. Read it, and if you agree, press Yes.
At this point, Active Directory confirms that the domain controller was removed successfully. If you receive an error that the object could not be found, Active Directory might have already been removed from the domain controller.
- In Active Directory Sites and Services, expand the appropriate site.
- Delete the server object associated with the failed domain controller.
- In Active Directory Users and Computers, expand the domain controllers container.
- Delete the computer object associated with the failed domain controller.
- AD will display another confirmation window. If you're sure that you want to delete the failed object, click Yes.
-
To remove the failed server object from DNS
-
In the DNS snap-in,ly:'Open Sans',sans-serif;font-size:13px;line-height:19px;">
- Delete the server object associated with the failed domain controller.