Others

Fix Access Denied Error When Demoting an Active Directory Domain Controller

Steven ParkerSteven Parker Nov 3, 2026 868 views

Question details

The user needs to demote a secondary Active Directory domain controller but encounters an Access Denied error from DFS Replication, preventing normal uninstallation.

How to Fix Access Denied Error When Demoting an Active Directory Domain Controller
Product
Windows Server
Device & OS
not provided
Scenario
Attempting to uninstall Active Directory Domain Services and demote a domain controller when DFS replication has failed or been removed.
Observed behavior
The standard domain controller demotion process fails and consistently returns an Access Denied error.
Before you start

Verify that your primary domain controller and DNS services are healthy and functioning correctly before manually removing any Active Directory components.

Solution 1Recommended

Clean Up AD DS Metadata and Manually Remove the Domain Controller

When normal demotion fails due to damaged replication, you must bypass the standard process, forcefully remove the failed domain controller, and manually clean up its metadata from Active Directory.

If the domain controller cannot communicate with the domain or DFS replication is broken, the standard demotion wizard will not work. You must perform a manual metadata cleanup to ensure no orphaned objects remain in your Active Directory environment.

1
Clean up server metadata

Log into a healthy domain controller. Use the Active Directory Sites and Services console or the NTDSUTIL command-line tool to delete the metadata associated with the failed secondary domain controller.

2
Delete the computer account

Open Active Directory Users and Computers, navigate to the Domain Controllers Organizational Unit (OU), and manually delete the computer object for the failed server.

3
Remove DNS records

Open the DNS Manager and manually delete any remaining DNS records (such as A records, CNAME, or SRV records) that point to the demoted domain controller to prevent client connection issues.

4
Forcefully remove AD DS

On the failed secondary server, forcefully remove the Active Directory Domain Services role using Server Manager or PowerShell if the role still appears installed.

Reference Documentation: For detailed command execution, refer to Microsoft's official AD DS metadata cleanup guidance and step-by-step manual removal procedures.
Free Microsoft Office alternative

Manage Your IT Documentation Effectively with WPS Office

While troubleshooting server infrastructure and Active Directory errors, maintaining clear and accurate IT documentation is essential. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office, perfect for drafting server topology reports, standard operating procedures, and administrative guides.

  1. 1. Download the installer: Visit the official WPS Office website and download the free installer for your administrative workstation.
  2. 2. Install WPS Office: Run the lightweight setup to install Writer, Spreadsheet, and Presentation modules in seconds.
  3. 3. Open existing IT documents: Seamlessly open your existing Microsoft Office documentation and continue editing without format loss.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Lightweight installation ideal for administrative workstations and IT jump servers.Built-in PDF tools for creating and editing standard operating procedures (SOPs).Familiar user interface ensuring zero learning curve for IT professionals.
microsoft office alternative - wps office

Frequently Asked Questions

Why do I get an Access Denied error from DFS Replication when demoting a DC?

This error typically occurs when the domain controller has lost communication with the primary controller, or if the DFS Replication database is corrupt or out of sync, preventing the demotion process from properly verifying the replication state.

What happens if I forcefully remove a domain controller without cleaning metadata?

Failing to clean up the metadata leaves orphaned server records in Active Directory and DNS. This can cause persistent replication errors, delays in client authentication, and conflicts when promoting new domain controllers in the future.

Can I use NTDSUTIL to remove the failed domain controller?

Yes, NTDSUTIL is the standard, Microsoft-recommended command-line tool used to safely clean up Active Directory metadata and manually remove lingering references to a failed domain controller.